BUG #4006: pg_ctl assumes that all config files lie in data_directory
The following bug has been logged online:
Bug reference: 4006
Logged by: David Schweikert
Email address: david@schweikert.ch
PostgreSQL version: 8.3.0
Operating system: Linux
Description: pg_ctl assumes that all config files lie in
data_directory
Details:
pg_ctl doesn't work if you put postgresql.conf in a different directory than
the database data files. According to the documentation, this is however
considered a good practice:
http://www.postgresql.org/docs/8.3/interactive/runtime-config-file-locations
.html
"David Schweikert" <david@schweikert.ch> writes:
pg_ctl doesn't work if you put postgresql.conf in a different directory than
the database data files.
Yeah, this is a known limitation that seems unlikely to get fixed soon,
as doing it right would appear to require giving pg_ctl the ability to
parse the config file completely.
regards, tom lane
Tom Lane wrote:
"David Schweikert" <david@schweikert.ch> writes:
pg_ctl doesn't work if you put postgresql.conf in a different directory than
the database data files.Yeah, this is a known limitation that seems unlikely to get fixed soon,
as doing it right would appear to require giving pg_ctl the ability to
parse the config file completely.
FYI, it is a TODO item:
* Allow pg_ctl to work properly with configuration files located outside
the PGDATA directory
pg_ctl can not read the pid file because it isn't located in the
config directory but in the PGDATA directory. The solution is to
allow pg_ctl to read and understand postgresql.conf to find the
data_directory value.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Hi,
On Mon, Mar 03, 2008 at 12:12:16 -0500, Bruce Momjian wrote:
pg_ctl can not read the pid file because it isn't located in the
config directory but in the PGDATA directory. The solution is to
allow pg_ctl to read and understand postgresql.conf to find the
data_directory value.
What about adding a command-line option to specify a different
configuration file? That would be certainly less nice, but also much
easier to implement, I guess.
Cheers
David