Hi,
The Postgresql configuration files can be kept elsewhere than the data
directory, as is described in the section about "File Locations."
(18.2 of as of 8.4)[1]
The documentation here basically mentions two ways of doing this.
First you can start Postgresql with the -D option to pg_ctl pointing to
the configuration files(/etc/postgresql for example), and then specify
the data cluster directory (/var/postgresql/data for example) inside
postgresql.conf.
$ pg_ctl -D /etc/postgresql -l .../logfile start
The second way is starting postgresql with the `config_file` parameter
passed to the postgres process via the -c option of the postgres
command, then specify each file individually inside postgresql.conf.
$ pg_ctl -o "-c config_file='/etc/postgresql/postgresql.conf'" \
-l .../logfile start
Both methods works fine on server startup, but the first method gives
problems when stopping the server with pg_ctl.
The problem I found is that pg_ctl expected the file 'postmaster.pid'
inside the configuration directory passed to with -D (/etc/postgresql),
but postgres created it in the data cluster directory as specified
inside postgresql.conf (/var/postgresql/data).
I could fake pg_ctl with -D pointing to the data cluster
directory, not to the configuration directory. Then it worked fine. But
I feel this is not the right way of doing things.
As I understand, `external_pid_file`, has nothing to do with this: it is
an *extra* pid file, not the one needed by pg_ctl.
Any comments on this are very welcome.
Thank you all and have a very nice day/night :)
Ludo
--
[1]
http://www.postgresql.org/docs/8.4/static/runtime-config-file-locations.html
--
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin