From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | "Ed L(dot)" <pgsql(at)bluepolka(dot)net> |
Cc: | PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: 8.0.0beta3 duration logging patch |
Date: | 2004-10-15 16:50:44 |
Message-ID: | 200410151650.i9FGoiE12643@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Patch applied. Thanks.
I made some small wording adjustments. Patch attached.
---------------------------------------------------------------------------
Ed L. wrote:
> The attached patch forces queryless duration log statements to be turned off
> in step with the log_statement directive. Without this patch, and with
> log_statement = 'mod' and log_duration = true, there is no way to silence
> SELECT query duration logging when quieting the logging of SELECT queries.
>
> Note this patch changes the semantics of log_duration from logging the
> duration of "every completed statement" to "every completed statement that
> satisfies log_statement directive". I argue this semantic change is
> justified given 1) the docs themselves recommend turning log_statement
> sufficiently up to be able to make this mapping, and 2) I can see it being
> quite common that folks only want to log queries (and durations) that
> change the database, while I fail to see the usefulness of queryless
> durations (and I'm trying to scratch my own itch with a small effort).
> It's possible someone else feels strongly about their queryless durations
> for reasons I cannot imagine. If so, then another more conservative
> approach may be in order.
>
> Note also this patch is independent of queries and durations logged due to
> the log_min_duration_statement directive. If, for example, log_statement =
> 'all', log_min_duration_statement = 1 (ms), and a SELECT query takes longer
> than 1ms, it's duration will be logged twice, with the 2nd log entry
> including the statement with the duration.
>
> Ed
[ Attachment, skipping... ]
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Attachment | Content-Type | Size |
---|---|---|
unknown_filename | text/plain | 3.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-10-15 16:57:54 | Re: Clarification of the PL/Perl documents |
Previous Message | Andrew Dunstan | 2004-10-15 16:18:44 | Re: plperl Safe restrictions |