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

Started by Ron Snyderabout 24 years ago4 messagespatches
Jump to latest
#1Ron Snyder
snyder@roguewave.com

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)

Show quoted text

--
Peter Eisentraut peter_e@gmx.net

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Ron Snyder (#1)

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

#3Ron Snyder
snyder@roguewave.com
In reply to: Tom Lane (#2)

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Thursday, June 13, 2002 10:28 PM
To: Bruce Momjian
Cc: snyder@roguewave.com; pgsql-patches@postgresql.org
Subject: Re: [PATCHES] guc.c and postgresql.conf.sample
constistency checker

See subsequent objections from Peter and me. We could use something
like this, but it needs to be smarter.

regards, tom lane

I understand and agree, unfortunately I haven't been able to take another
look at it.

-ron

#4Ron Snyder
snyder@roguewave.com
In reply to: Ron Snyder (#3)

debug_level seems to be missing from guc.c

already fixed

fixbtree seems to be missing from postgresql.conf.sample

pre_auth_delay seems to be missing from postgresql.conf.sample
lc_messages seems to be missing from postgresql.conf.sample
lc_monetary seems to be missing from postgresql.conf.sample
lc_numeric seems to be missing from postgresql.conf.sample
lc_time seems to be missing from postgresql.conf.sample

lc_* are added by initdb, pre_auth_delay is intentionally undocumented.

I don't know about the others.

-ron

Show quoted text

server_encoding seems to be missing from postgresql.conf.sample
session_authorization seems to be missing from
postgresql.conf.sample

debug_level is removed from postgresql.conf already, replaced by
client/server_min_messages.

-- 
Bruce Momjian                        |  http://candle.pha.pa.us
pgman@candle.pha.pa.us               |  (610) 853-3000
+  If your life is a hard drive,     |  830 Blythe Avenue
+  Christ can be your backup.        |  Drexel Hill, 
Pennsylvania 19026