Re: fix log_min_duration_statement logic error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Neil Conway <neilc(at)samurai(dot)com>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: fix log_min_duration_statement logic error
Date: 2003-10-05 03:30:34
Message-ID: 27508.1065324634@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> The reason we
> needed to do it this way was so we could print the statement _after_ it
> completes so we could include the duration.

The behavior I had in mind was to dump the statement at the end of the
query if (a) the duration needs to be printed and (b) the statement
wasn't already dumped at the start --- ie, log_statement was not on
at the start.

The historical behavior of log_min_error_statement has been to make two
separate log entries: the failing query and the error. This has worked
well enough AFAIK; why not keep that behavior for log_min_duration?

BTW, there's a separate set of problems that have yet to be addressed,
which is how any of these logging options apply for V3-protocol query
operations. The existing code only seems to work for the old-style
query path.

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2003-10-05 03:45:42 Re: fix log_min_duration_statement logic error
Previous Message Bruce Momjian 2003-10-05 03:12:52 Re: fix log_min_duration_statement logic error