Fix a couple of issues in recent patch to print updates to postgresql.conf

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 54d60bbd075a61c7dd2ef384dc930d726d68ee64
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2009-10-03T18:04:57Z
Releases: 9.0.0
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.

Files

PathChange+/−
src/backend/utils/misc/guc.c modified +9 −3
src/backend/utils/misc/guc-file.l modified +12 −7
src/include/utils/guc.h modified +2 −2
src/timezone/pgtz.c modified +3 −3