public inbox for [email protected]
help / color / mirror / Atom feedFrom: Christian Robottom Reis <[email protected]>
To: Bruce Momjian <[email protected]>
Cc: [email protected]
Cc: Guilherme Salgado <[email protected]>
Subject: Re: log_min_duration_statement versus log_statement
Date: Wed, 29 Jun 2005 16:40:20 -0300
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
On Tue, Jun 28, 2005 at 09:22:55PM -0400, Bruce Momjian wrote:
> I think you are confused because log_min_duration_statement is really
> about _when_ to log (duration > ? ms), and what to log (the statement).
Right. In a way it is an "additional option" that acts independently of
log_statement and log_duration, and as such, should be described or even
categorized separately.
> OK, what if we change the documentaiton to be:
>
> log_min_duration_statement = 1000 # Log all statements whose
> # execution time exceeds the value, in
> # milliseconds. -1 disables. Zero logs
> # all statements and their durations.
Well, I think the confusion that we had (interaction between
log_min_duration_statement and log_statement and log_duration) isn't
really cleared up (this isn't the first time I've seen people ask me
about it at the support center here).
> Also, if you set log_min_duration_statement = 1000, it will print every
> statement which takes over 1 second, and its duration. Are you not
> seeing that happen?
I do see it happen, but when log_duration and log_statement are enabled
you often fail to see the double-logging. log_min_duration_statement is
really an independent option that should be in a separate category.
My suggestion:
- Move log_min_duration_statement out of the "when/what" to log
categories, and put it under an "Additional logging" heading.
- Change the comment to say:
# Log all statements whose execution time exceeds this value.
# Note that this setting is independent of the log_statement and
# log_duration options above; if you set both log_statement and
# log_min_duration_statement you will get statements logged as
# per the "When to log" options, with long-running statements
# possibly logged twice.
#
# Time in milliseconds. -1 disables. Zero logs all statements
# and their durations.
log_min_duration_statement = 1000
(sorry for the formatting fix, but it really improved
readability; it's not critical of course)
You could just use the second half of the suggestion, but moving it out
of the section probably matches better the mental model we are trying
to suggest to end-users.
I agree the comment still isn't the clearest, but the only way to really
clarify would be to change the behaviour of log_min_duration_statement
to really be a "When" type of option (i.e., only controlled when to log,
and having the "What" options define what).
Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 3376 0125
view thread (5+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: log_min_duration_statement versus log_statement
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox