Re: fix log_min_duration_statement logic error

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: fix log_min_duration_statement logic error
Дата
Msg-id Pine.LNX.4.44.0310071826240.21517-100000@peter.localdomain
обсуждение исходный текст
Ответ на 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 writes:

> Another idea if you like consistency would be:
>
>     LOG:  duration: 4.056 ms  query: select * \nfrom pg_language;

Speaking of consistency...

Imagine someone always having log_statement on and doing some sort of
aggregate query counting, say like grep '^LOG: query:' | wc -l.  Now that
someone (or maybe the admin on the night shift, to make it more dramatic)
also turns on log_min_statement_duration (or whatever it's spelled), say
to find the slowest queries: grep '^LOG: duration:' | sort -xyz | head
-10.  In order to guarantee the consistency of both results, you'd have to
log each query twice in this case.

--
Peter Eisentraut   peter_e@gmx.net


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

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