Don't allow data_directory to be set in postgresql.auto.conf by ALTER SYSTEM.

Fujii Masao <fujii@postgresql.org>

Commit: fc5cf383d9ae894e3c9e94701ce5dc468d334433
Author: Fujii Masao <fujii@postgresql.org>
Date: 2014-06-19T11:32:55Z
Releases: 9.4.0
Don't allow data_directory to be set in postgresql.auto.conf by ALTER SYSTEM.

data_directory could be set both in postgresql.conf and postgresql.auto.conf so far.
This could cause some problematic situations like circular definition. To avoid such
situations, this commit forbids a user to set data_directory in postgresql.auto.conf.

Backpatch this to 9.4 where ALTER SYSTEM command was introduced.

Amit Kapila, reviewed by Abhijit Menon-Sen, with minor adjustments by me.

Files

PathChange+/−
doc/src/sgml/ref/alter_system.sgml modified +10 −0
src/backend/utils/misc/guc.c modified +15 −6
src/include/utils/guc.h modified +1 −0