Em 15 de maio de 2012 17:39, veronica almeida <[email protected]
> escreveu:

>
> Alguns comandos de DML aparecem no log mesmo sem terem erro ou a duração
> maior ou igual ao estipulado no arquivo de configuração. Devo me preocupar
> com isso? Sabem por que ocorre?
>
> Por exemplo:
>
> LOG:  statement: SELECT * FROM tabela;
>
> Não existe o "duration", como:
>
> LOG:  duration: 12718.705 ms  statement: SELECT * FROM tabela;
>
> Configuração:
>
> <corte>
>
> log_min_duration_statement = 5000
> log_line_prefix = '%t [%p]: [%l-1]user=%u,db=%d,ip=%h'
> log_statement = 'mod'
>
>

Não tem com o que vc se preocupar, esse é o comportamento padrão do uso do
"log_min_duration_statement" junto do "log_statement". Do manual [1]:


"Note: When using this option together with log_statement, the text of
statements that are logged because of log_statement will not be repeated in
the duration log message. If you are not using syslog, it is recommended
that you log the PID or session ID using log_line_prefix so that you can
link the statement message to the later duration message using the process
ID or session ID."


Pelo seu "log_line_prefix" vc colou apenas parte da linha do log. Verifique
se o %p (pid processo) não é o mesmo nas duas entradas.

[1] http://www.postgresql.org/docs/9.2/static/runtime-config-logging.html

-- 
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Blog sobre TI: http://fabriziomello.blogspot.com
>> Perfil Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

Responder a