Re: Allow auto_explain to log to NOTICE

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>, Tom Dunstan <tom(at)tomd(dot)cc>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, jdealmeidapereira(at)pivotal(dot)io
Subject: Re: Allow auto_explain to log to NOTICE
Date: 2018-12-26 05:42:55
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: 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..

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuro Yamada 2018-12-26 05:50:26 Re: Tab completion for ALTER INDEX|TABLE ALTER COLUMN SET STATISTICS
Previous Message Michael Paquier 2018-12-26 05:15:02 Re: Tab completion for ALTER INDEX|TABLE ALTER COLUMN SET STATISTICS