Log duration and statement for slow queries + limiting the number of log files generated - Mailing list pgsql-general

From Alec Swan
Subject Log duration and statement for slow queries + limiting the number of log files generated
Date
Msg-id CAPKnvFf+=fBaOT+joDfkcHD2AJD+8KO6EE-uND+VHMMk+QWKvw@mail.gmail.com
Whole thread Raw
Responses Re: Log duration and statement for slow queries + limiting the number of log files generated
Re: Log duration and statement for slow queries + limiting the number of log files generated
List pgsql-general
Hello,

I am trying to get postgres 8.4.4 to log the duration and statement of
queries that take longer than 200 ms. I played with the log settings
in postgresql.conf but I still see logs of durations of very fast
statements. Here is my current configuration:

log_min_duration_statement = 200
log_duration = on
log_line_prefix = '<%t> '
log_statement = 'all'

With this configuration I am still getting these in the log files:

<2011-09-02 14:47:19 EDT> LOG:  duration: 0.017 ms
<2011-09-02 14:47:19 EDT> LOG:  execute <unnamed>: SET SESSION
CHARACTERISTICS AS TRANSACTION READ WRITE
<2011-09-02 14:47:19 EDT> LOG:  duration: 0.004 ms
<2011-09-02 14:47:19 EDT> LOG:  duration: 0.014 ms
<2011-09-02 14:47:19 EDT> LOG:  duration: 0.017 ms
<2011-09-02 14:47:19 EDT> LOG:  execute <unnamed>: SET SESSION
CHARACTERISTICS AS TRANSACTION READ ONLY


How do I filter these out?

Also, how do I restrict the maximum number of log files generated to 2
with the assumption that they will roll over when filled?

Thanks,

Alec

pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: Log Apply Delay
Next
From: Tom Lane
Date:
Subject: Re: Log message " last_statrequest ... is later than collector's time" - what does it mean?