Re: fix log_min_duration_statement logic error

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: fix log_min_duration_statement logic error
Дата
Msg-id 27508.1065324634@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: fix log_min_duration_statement logic error  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: fix log_min_duration_statement logic error  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-patches
Bruce Momjian <pgman@candle.pha.pa.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

В списке pgsql-patches по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: fix log_min_duration_statement logic error
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: fix log_min_duration_statement logic error