Fix a couple of issues in recent patch to print updates to postgresql.conf
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 3 Oct 2009 18:04:57 +0000 (18:04 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 3 Oct 2009 18:04:57 +0000 (18:04 +0000)
commit6d3a1e3b941d8581ab5dcc1dbfcb423a5329020c
treefa6b120075d1d2e26476696f92c5ae5e94bffb61
parent2db81dd6cbeeb79f196be812cca2849e5526863c
Fix a couple of issues in recent patch to print updates to postgresql.conf
settings: avoid calling superuser() in contexts where it's not defined,
don't leak the transient copies of GetConfigOption output, and avoid the
whole exercise in postmaster child processes.

I found that actually no current caller of GetConfigOption has any use for
its internal check of GUC_SUPERUSER_ONLY.  But rather than just remove
that entirely, it seemed better to add a parameter indicating whether to
enforce the check.

Per report from Simon and subsequent testing.
src/backend/utils/misc/guc-file.l
src/backend/utils/misc/guc.c
src/include/utils/guc.h
src/timezone/pgtz.c