Re: Allow auto_explain to log to NOTICE

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Allow auto_explain to log to NOTICE
Дата
Msg-id 20181226054255.GJ2234@paquier.xyz
обсуждение исходный текст
Ответ на Re: Allow auto_explain to log to NOTICE  (Daniel Gustafsson <daniel@yesql.se>)
Ответы Re: Allow auto_explain to log to NOTICE  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-hackers
On Tue, Oct 30, 2018 at 11:44:42AM +0100, Daniel Gustafsson wrote:
> Circling back to this, I updated the patch with providing another
> option as I couldn’t think of another way to do it cleanly.  I’ll
> add the patch to the next CF but as it’s just about to start it
> should be moved to the next once started.

+-- Shouldn't log due to query being too fast
+SET auto_explain.log_level = NOTICE;
+SET auto_explain.log_min_duration = 1000;
+SELECT NULL FROM pg_catalog.pg_class WHERE relname = 'pg_class';
I am ready to be that 1s is not enough as some buildfarm machines are
legendary slow.  Honestly, to not have more to worry about I think
that this bit should be dropped.

"auto_explain.log_duration" should actually be named log_summary,
except that it defaults to true to be backward-compatible, while for
EXPLAIN the default is false, no?  It would be nice to be consistent
with EXPLAIN for those options for the naming at least.  The default
behavior of those parameters would be inconsistent as the duration is
showed by default with auto_explain and not with EXPLAIN, but it does
not seem like a good idea to change that..
--
Michael

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Tab completion for ALTER INDEX|TABLE ALTER COLUMN SET STATISTICS
Следующее
От: Tatsuro Yamada
Дата:
Сообщение: Re: Tab completion for ALTER INDEX|TABLE ALTER COLUMN SET STATISTICS