Thread: Re: guc.c and postgresql.conf.sample constistency check

Re: guc.c and postgresql.conf.sample constistency check

From
Ron Snyder
Date:
>
> The catch is that some of these options (lc_*) are supposed
> to be absent,
> so it's not as easy as it seems.

Hmm. Are you saying that lc_* are being pulled out of code, so shouldn't be
in postgresql.conf.sample, or that they're staying in code but still
shouldn't be in postgresql.conf.sample?

According to guc.c, lc_* (except for lc_messages) are all PGC_USERSET, and
lc_messages is PGC_SUSET. Do those preclude the admin from setting defaults?
(Or is it that you don't want to suggest that they can be changed easily?
initdb wouldn't have to be to be re-run after changing the lc_* settings,
would it?)

Here's a bit from guc.h:
 * SUSET options can be set at postmaster startup, with the SIGHUP
 * mechanism, or from SQL if you're a superuser. These options cannot
 * be set using the PGOPTIONS mechanism, because there is not check as
 * to who does this.
 *
 * USERSET options can be set by anyone any time.

-ron (just trying to learn and contribute)


>
> --
> Peter Eisentraut   peter_e@gmx.net
>

Re: guc.c and postgresql.conf.sample constistency check

From
Tom Lane
Date:
Ron Snyder <snyder@roguewave.com> writes:
>> The catch is that some of these options (lc_*) are supposed
>> to be absent,
>> so it's not as easy as it seems.

> Hmm. Are you saying that lc_* are being pulled out of code, so shouldn't be
> in postgresql.conf.sample, or that they're staying in code but still
> shouldn't be in postgresql.conf.sample?

The lc_ items are actually inserted into postgresql.conf by initdb, so
they don't belong in the sample file.  There are a couple other items
that are deliberately undocumented (PreAuthDelay for one).  I think your
tool might be useful for catching unintentional omissions, but it'd have
to be tweaked to have a list of the intentional omissions.

> Here's a bit from guc.h:

It's generally unhelpful to quote a comment at its author ;-)

            regards, tom lane