Re: postgresql.auto.conf and reload

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Christoph Berg <cb(at)df7cb(dot)de>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: postgresql.auto.conf and reload
Date: 2014-06-27 03:41:10
Message-ID: CAA4eK1JcTfy7O1E4eAAOY++DteAHfkSMeBvNqjgKfdxMdCzm+A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jun 26, 2014 at 1:49 PM, Christoph Berg <cb(at)df7cb(dot)de> wrote:
>
> Re: Amit Kapila 2014-06-26 <CAA4eK1+mUTjc=GXJK3bYtSwV2BmBni=
PHEvBqLQkhdUV9cWd1A(at)mail(dot)gmail(dot)com>
> > On Wed, Jun 25, 2014 at 7:52 PM, Christoph Berg <cb(at)df7cb(dot)de> wrote:
> > > Re: Amit Kapila 2014-06-25 <
> > CAA4eK1+F9ZtoGvVw-WYj2+vT0K8_JXTziqHp8iVB7wdo1w1Rkw(at)mail(dot)gmail(dot)com>
> > >
> > > > I think maintaining values both in postgresql.conf and by Alter
System
> > > > is not advisable.
> > >
> > > Possibly, but then the system should be warning about all options, not
> > > just the restart-only ones. And it should warn at startup, not at
> > > reload time.
> >
> > How about adding a note in Alter System so that users are aware of
> > such behaviour and can ensure that they don't have duplicate entries?
>
> If the behavior isn't going to change, that issue need to be
> documented, sure.

I will send a patch to address this unless someone comes with a better
way to address this and if no one objects to adding a note in Alter System
documentation.

> > Clearly such warnings indicate that there are conflicting settings, so
> > user can take appropriate action to avoid it.
>
> I don't think conflicting settings in postgresql.auto.conf are a user
> error, or misconfiguration. They are just normal use of ALTER SYSTEM.
> Of course the user might want to eventually consolidate their config,
> but we shouldn't treat the situation as bogus.
>
> Frankly what bugs me most about this is that the warnings occur only
> at reload time, not at startup. If the server thinks something is
> wrong with my config, it should tell me rightaway.

As per current design/code, server don't treat duplicate entries
via config file's as a problem, rather the last one is given preference.
So in the case you are mentioning, it gives warning at reload time as
it encounter's a different value than current value for PGC_POSTMASTER
parameter.

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2014-06-27 04:22:57 Re: ALTER SYSTEM RESET?
Previous Message Kyotaro HORIGUCHI 2014-06-27 03:29:11 Re: pg_resetxlog to clear backup start/end locations.