Re: Logging configuration changes [REVIEW] - Mailing list pgsql-hackers

From Abhijit Menon-Sen
Subject Re: Logging configuration changes [REVIEW]
Date
Msg-id 20090916052414.GA3371@toroid.org
Whole thread Raw
In response to Re: Logging configuration changes  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Logging configuration changes [REVIEW]
Re: Logging configuration changes [REVIEW]
List pgsql-hackers
(This is my review of the small patch Peter posted on 2009-08-29. See
http://archives.postgresql.org/message-id/1251495487.18151.12.camel@vanquo.pezone.net
for the original message.)

At 2009-08-29 00:38:07 +0300, peter_e@gmx.net wrote:
>
> Found an easy solution; see attached patch.

Neat. The patch (a) applies to HEAD and builds correctly, (b) does what
it's supposed to, i.e. report parameters whose value has been changed or
reset to the default, and (c) seems sensible.

I can't help but think that it would be nice to report the default value
of a parameter that is reset (i.e. "parameter $x reset to default value
$y"). The first attached patch does this by calling GetConfigOption()
after the value has been reset by set_config_option(). It also skips
the report if the earlier value was the same as the default.

> On a related note, I suggest reverting or revising this logging change:
> http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=293c816e4aad8e760bcb4eaba0aa16da0ccd2d04

FWIW, I agree about this too.

I would suggest changing the errmsg to just "Parameter \"%s\" cannot be
changed without restarting the server". I have attached a second patch
to do this.

LOG:  received SIGHUP, reloading configuration files
LOG:  parameter "log_connections" reset to default value "off"
LOG:  parameter "log_disconnections" reset to default value "off"
LOG:  Parameter "max_connections" cannot be changed without restarting the server
LOG:  parameter "log_checkpoints" changed to "on"

-- ams

Attachment

pgsql-hackers by date:

Previous
From: Itagaki Takahiro
Date:
Subject: Re: FDW-based dblink (WIP)
Next
From: Jeff Davis
Date:
Subject: Re: opportunistic tuple freezing