postgresql/src/backend
Tom Lane 195e81aff5 Find postgresql.auto.conf in PGDATA even when postgresql.conf is elsewhere.
The original coding for ALTER SYSTEM made a fundamentally bogus assumption
that postgresql.auto.conf could be sought relative to the main config file
if we hadn't yet determined the value of data_directory.  This fails for
common arrangements with the config file elsewhere, as reported by
Christoph Berg.

The simplest fix is to not try to read postgresql.auto.conf until after
SelectConfigFiles has chosen (and locked down) the data_directory setting.

Because of the logic in ProcessConfigFile for handling resetting of GUCs
that've been removed from the config file, we cannot easily read the main
and auto config files separately; so this patch adopts a brute force
approach of reading the main config file twice during postmaster startup.
That's a tad ugly, but the actual time cost is likely to be negligible,
and there's no time for a more invasive redesign before beta.

With this patch, any attempt to set data_directory via ALTER SYSTEM
will be silently ignored.  It would probably be better to throw an
error, but that can be dealt with later.  This bug, however, would
prevent any testing of ALTER SYSTEM by a significant fraction of the
userbase, so it seems important to get it fixed before beta.
2014-05-11 15:13:30 -04:00
..
access Rename min_recovery_apply_delay to recovery_min_apply_delay. 2014-05-10 19:46:19 -04:00
bootstrap pgindent run for 9.4 2014-05-06 12:12:18 -04:00
catalog pgindent run for 9.4 2014-05-06 12:12:18 -04:00
commands pgindent run for 9.4 2014-05-06 12:12:18 -04:00
executor Improve comment for tricky aspect of index-only scans. 2014-05-06 19:27:43 -07:00
foreign Update copyright for 2014 2014-01-07 16:05:30 -05:00
lib pgindent run for 9.4 2014-05-06 12:12:18 -04:00
libpq pgindent run for 9.4 2014-05-06 12:12:18 -04:00
main pgindent run for 9.4 2014-05-06 12:12:18 -04:00
nodes pgindent run for 9.4 2014-05-06 12:12:18 -04:00
optimizer Revert "Auto-tune effective_cache size to be 4x shared buffers" 2014-05-08 20:49:38 -04:00
parser pgindent run for 9.4 2014-05-06 12:12:18 -04:00
po Translation updates 2014-05-10 22:16:59 -04:00
port pgindent run for 9.4 2014-05-06 12:12:18 -04:00
postmaster When a background worker exists with code 0, unregister it. 2014-05-07 17:44:42 -04:00
regex pgindent run for 9.4 2014-05-06 12:12:18 -04:00
replication Code review for logical decoding patch. 2014-05-09 10:44:04 -04:00
rewrite pgindent run for 9.4 2014-05-06 12:12:18 -04:00
snowball Prefer pg_any_to_server/pg_server_to_any over pg_do_encoding_conversion. 2014-02-23 16:59:05 -05:00
storage Fix logic bug in dsm_attach(). 2014-05-06 13:40:34 -04:00
tcop Fix failure to set ActiveSnapshot while rewinding a cursor. 2014-05-07 14:25:11 -04:00
tsearch pgindent run for 9.4 2014-05-06 12:12:18 -04:00
utils Find postgresql.auto.conf in PGDATA even when postgresql.conf is elsewhere. 2014-05-11 15:13:30 -04:00
.gitignore Add gitignore for mingw/cygwin build outputs 2011-06-09 18:11:47 +02:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
Makefile Get rid of use of dlltool in Mingw builds. 2014-02-11 12:56:20 -05:00
nls.mk Add libpgcommon to backend gettext source files 2013-10-19 13:49:05 -04:00