Ola Roberto!
Justamente..não se trata de softaware pronto quero desenvolver algumas
triggers que grave os inserts,update e deletes, em uma outra tabelas, que
ficará registrado o usuario, a hora e  o ip da estação.
meu problema é o seguinte..O Módulo de usuários do sistema e controlado pelo
Admin do Django(framework Python), então desse modo não sei como pegar o
usuário da sessão do sistema através da trigger..Estou aberto a outras
soluções caso alguem possa ajudar.


2010/10/25 <[email protected]>

> Send pgbr-geral mailing list submissions to
>        [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
>
> https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
> or, via email, send a message with subject or body 'help' to
>        [email protected]
>
> You can reach the person managing the list at
>        [email protected]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of pgbr-geral digest..."
>
>
> Tópicos de Hoje:
>
>   1. Auditoria PostgreSQL (Emerson Martins)
>   2. URGENTE - PROBLEMAS DE CARGALO NA CPU DAS VM'S
>      (sebastiao fidencio)
>   3. Re: Auditoria PostgreSQL (Roberto Mello)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 25 Oct 2010 11:16:41 -0300
> From: Emerson Martins <[email protected]>
> Subject: [pgbr-geral] Auditoria PostgreSQL
> To: [email protected]
> Message-ID:
>        
> <[email protected]<aanlktikvp2kekqkto-o19f_olot_txw9iwpunnzfj%[email protected]>
> >
> Content-Type: text/plain; charset="iso-8859-1"
>
> Olá pessoal.
>
> Procuro Soluções de Auditoria para PostgreSQL, só que com uma
> particularidade.Nossa empresa trabalha com desenvolvimento através do
> framework Django.Logo preciso saber se alguém sabe como controlar a
> auditoria baseada no usuario do admin do django.
>
>
>
> Desde já agradeço a atenção
>
>
>
> Emerson Martins
> Analista de Banco de Dados - Itec-AL
> -------------- Próxima Parte ----------
> Um anexo em HTML foi limpo...
> URL:
> http://listas.postgresql.org.br/pipermail/pgbr-geral/attachments/20101025/a5cb5ea9/attachment-0001.htm
>
> ------------------------------
>
> Message: 2
> Date: Mon, 25 Oct 2010 12:39:02 -0200
> From: sebastiao fidencio <[email protected]>
> Subject: [pgbr-geral] URGENTE - PROBLEMAS DE CARGALO NA CPU DAS VM'S
> To: Comunidade PostgreSQL Brasileira
>        <[email protected]>
> Message-ID:
>        
> <[email protected]<aanlktinqben0dvv6tt4sk9tgqjs%[email protected]>
> >
> Content-Type: text/plain; charset="iso-8859-1"
>
> ESTOU trabalhando em ambiente virtualizado com VM4 Enterprise, cuja versão
> da dist do linxu é 11 enterprise(64bits) e o pgsql é 8.1.17 compilado.
>
>
>
> A maquina é virtualizada ? *R:é virtualizado sim..*
> 200 GB de partiação esta em RAID ? Se esta qual ? *R:RAID 10, está em
> storage, pessoal da HP que configurou.. *
>
> Tipo de disco da sua maquina ?
>
> *R:hot swap., SAS.., storage está ligado via fibber channel nas maquinas
> fisicas*
>
>
> Se o ERP esta homologado para 8.2 serial ideal migrar?
>
> *R:Sim, vamos tentar uma upgrade, agora so uma pergunta, eu posso atualizar
> os binarios do postgresql,. q depois os clusters do meu BD irá subir
> normalmente, ou terei que fazer Dump antes de fazer upgrade, e logo apos a
> atualização restaurar a base? Vocês acham que atualizando pode resolver
> esse
> problema?*
>
>
> Tamanho do Banco: *81GB*
>
>
> VM Dedidcada ? *Sim*
>
>
> Tem como rodar Explain nas consultas? *SÓ SOFTWARE HOUSE FARIA isso,
> porquanto o código SQL está encpasulado na camada de negocio da aplicação
> (Sistema desenvolvido em Delphi)*
>
>
> Possui Indices ? *Sim*  Possui PK nas tabelas ?* Não*  Possui FK? *Não*
>
>
> Segue meu postgresql.conf e o systctl.conf
>
>
>
> ==============================================================*System V*
> kernel.shmmax = 5368709120
> kernel.shmmni = 4096
> kernel.shmall = 1310720
> ==============================================================
>
> *Postgresql.conf
>
> max_connections = 200
> shared_buffers = 524288 #4GB RAM ou 25% da RAM TOTAL = 16 GB (valor em
> blocos de 8kB)
>                         #Shared Memory do SO ou shmmax=5368709120 ou 5 GB
> esse cara deve ser 20% a mais do shared buffers
> #temp_buffers = 1000                    # min 100, 8KB each
> #max_prepared_transactions = 5          # can be 0 or more
> # note: increasing max_prepared_transactions costs ~600 bytes of shared
> memory
> # per transaction slot, plus lock space (see max_locks_per_transaction).
> #work_mem = 71780                       # min 64, size in KB
> #tunnig - 22/10/2010
> work_mem = 1048576 #1GB Para ordenacoes, grop by, order by | min 64, size
> in
> KB
> #tunnig - 22/10/2010
> maintenance_work_mem = 1048576          # min 1024, size in KB
> #Config atual
> #maintenance_work_mem = 16384           # min 1024, size in KB
> #tunnig - 22/10/2010
> max_stack_depth = 8192                  # min 100, size in KB
> #max_stack_depth = 2048                 # min 100, size in KB
> #tunnig - 22/10/2010
> vacuum_mem=172928
>
>
> #tunnig 22/10/2010
> max_fsm_pages=120000
>
> fsync = on                              # turns forced synchronization on
> or
> off
> wal_buffers = 512                       # min 4, 8KB each
> commit_siblings = 5                     # range 1-1000
> checkpoint_segments = 3
> #tunnig 22/10/2010*
>
> *enable_bitmapscan = on
> enable_hashagg = on
> enable_hashjoin = on
> enable_indexscan = on
> enable_mergejoin = on
> enable_nestloop = on
> enable_seqscan = off
> enable_sort = on
> enable_tidscan = off*
>
> *# - Planner Cost Constants -
> #tunnig 22/10/2010
> effective_cache_size = 1050256          # typically 8KB each
> log_destination = 'stderr'              # Valid values are combinations of
>                                        # stderr, syslog and eventlog,
>                                        # depending on platform.
> # This is used when logging to stderr:
> redirect_stderr = on                    # Enable capturing of stderr into
> log
>                                        # files
> # These are only used if redirect_stderr is on:
> #log_directory = 'pg_log'               # Directory where log files are
> written
> log_directory = '/dados/pgsql/log'      # Directory where log files are
> written
>                                        # Can be absolute or relative to
> PGDATA
> log_filename = 'erp-%Y-%m-%d_%H%M%S.log' # Log file name pattern.
>                                        # Can include strftime() escapes
> #log_truncate_on_rotation = off # If on, any existing log file of the same
>                                        # name as the new log file will be
>                                        # truncated rather than appended to.
> But
>                                        # such truncation only occurs on
>                                        # time-driven rotation, not on
> restarts
>                                        # or size-driven rotation. Default
> is
>                                        # off, meaning append to existing
> files
>                                        # in all cases.
> log_rotation_age = 0                    # Automatic rotation of logfiles
> will
>                                        # happen after so many minutes.  0
> to
>                                        # disable.
> log_rotation_size = 10240               # Automatic rotation of logfiles
> will
>                                        # happen after so many kilobytes of
> log
>                                        # output.  0 to disable.
>
> # These are relevant when logging to syslog:
> syslog_facility = 'LOCAL0'
> syslog_ident = 'postgres'
> client_min_messages = log               # Values, in order of decreasing
> detail:
> log_min_messages = log                  # Values, in order of decreasing
> detail:
> log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements
>                                        # and their durations, in
> milliseconds.
> silent_mode = on                        # DO NOT USE without syslog or
>                                        # redirect_stderr
> log_line_prefix =  '(Processo %p, Data e Hora %t, usuario: %u, database:
> %d,
> host: %r, Comando: %i)'
> #log_line_prefix = '%t %d %u '                  # Special values:
>  log_statement = 'mod'           # none, mod, ddl, all
> log_hostname = true
> log_parser_stats = off
> log_planner_stats = off
> log_executor_stats = off
> stats_start_collector = on
> stats_command_string = off
> stats_block_level = off
> stats_row_level = on
> stats_reset_on_server_start = off
>
>
>
> #---------------------------------------------------------------------------
> # AUTOVACUUM PARAMETERS
>
> #---------------------------------------------------------------------------
>
> autovacuum = on                         # enable autovacuum subprocess?
> autovacuum_naptime = 600                # time between autovacuum runs, in
> secs
> autovacuum_vacuum_threshold = 1000      # min # of tuple updates before
>                                        # vacuum
> autovacuum_analyze_threshold = 500      # min # of tuple updates before
>                                        # analyze
> datestyle = 'iso, mdy'
> stats_start_collector = on
> stats_command_string = off
> stats_block_level = off
> stats_row_level = on
> stats_reset_on_server_start = off
>
> *
>
> *ERP :
> **   R:RP informática,  (http://www.rpinfo.com.br/) é um ERP voltado para
> o
> ramo    varejista*
>
>
> Espero um retorno por gentileza amigos.!
> -------------- Próxima Parte ----------
> Um anexo em HTML foi limpo...
> URL:
> http://listas.postgresql.org.br/pipermail/pgbr-geral/attachments/20101025/1e1efa36/attachment-0001.htm
>
> ------------------------------
>
> Message: 3
> Date: Mon, 25 Oct 2010 10:48:19 -0400
> From: Roberto Mello <[email protected]>
> Subject: Re: [pgbr-geral] Auditoria PostgreSQL
> To: Comunidade PostgreSQL Brasileira
>        <[email protected]>
> Message-ID:
>        <[email protected]>
> Content-Type: text/plain; charset=UTF-8
>
> 2010/10/25 Emerson Martins <[email protected]>:
> > Olá pessoal.
> > Procuro Soluções de Auditoria para PostgreSQL, só que com uma
> > particularidade.Nossa empresa trabalha com desenvolvimento através do
> > framework Django.Logo preciso saber se alguém sabe como controlar a
> > auditoria baseada no usuario do admin do django.
>
> Não entendi.
>
> - O que você quer dizer com auditoria? Auditoria do que? De mudanças
> nos dados? De conexões?
> - O que você quer dizer com soluções? Software pronto? Livre?
> Comercial? Consultoria para desenhar e implementar uma solução?
>
>
> Roberto
>
>
> ------------------------------
>
> _______________________________________________
> pgbr-geral mailing list
> [email protected]
> https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
>
>
> Fim da Digest pgbr-geral, volume 22, assunto 47
> ***********************************************
>
_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

Responder a