Re: Allow auto_explain to log to NOTICE - Mailing list pgsql-hackers

From Tom Dunstan
Subject Re: Allow auto_explain to log to NOTICE
Date
Msg-id CAPPfruwAzZFndrhqWKs2_digUQmf00oqhqGRyjENGoUh7JcfXw@mail.gmail.com
Whole thread Raw
In response to Allow auto_explain to log to NOTICE  (Tom Dunstan <pgsql@tomd.cc>)
List pgsql-hackers
(Resent with subscribed email address, thanks gmail)

Hi Andres, thanks for the extremely fast review!

On 27 April 2018 at 11:46, Andres Freund <andres@anarazel.de> wrote:

> I don't see any tests for auto_explain so haven't added any test cases.
> Happy to do so if that's deemed necessary.

I'd be in favor of adding them.

OK, sure.
 
> +static int   auto_explain_log_destination = LOG;

I very much dislike this name - it's too similar too the log_destination
GUC, while being about something different. How about "log_level"?

Works for me.
 
> +static const struct config_enum_entry destination_options[] = {
> +     {"log", LOG, false},
> +     {"notice", NOTICE, false},
> +     {NULL, 0, false}
> +};

I'd argue this should contain the non-error cases. It's just as
reasonable to want to add this as a debug level or such.

So all of warning, info, debug and debug1-5?

Thanks

Tom

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Allow auto_explain to log to NOTICE
Next
From: Andres Freund
Date:
Subject: Re: Allow auto_explain to log to NOTICE