The last configuration file patch (I hope!) This one does it all.
PostgreSQL Extended Configuration Patch
Mohawk Software, 2003
This patch enables PostgreSQL to be far more flexible in
its configuration methodology.
Specifically, It adds two more command line parameters, "-C"
which specifies either the location of the postgres
configuration file or a directory containing the configuration
files, and "-R" which directs PostgreSQL to write its runtime
process ID to a standard file which can be used by control
scripts to control PostgreSQL.
A patched version of PostgreSQL will function as:
--- Configuration file ---
postmaster -C /etc/postgres/postgresql.conf
This will direct the postmaster program to use the
configuration file "/etc/postgres/postgresql.conf"
--- Configuration Directory ---
postmaster -C /etc/postgres
This will direct the postmaster program to search the
directory "/etc/postgres" for the standard configuration
file names: postgresql.conf, pg_hba.conf, and pg_ident.conf.
--- Run-time process ID ---
postmaster -R /var/run/postmaster.pid
This will direct PostgreSQL to write its process ID number
to a file, /var/run/postgresql.conf
--- postgresql.conf options ---
Within the configuration file there are five additional
parameters: include, hba_conf,ident_conf, data_dir, and
runtime_pidfile.
They are used as:
include = '/etc/postgres/debug.conf'
data_dir = '/vol01/postgres'
hba_conf = '/etc/postgres/pg_hba_conf'
ident_conf = '/etc/postgres/pg_ident.conf'
runtime_pidfile = '/var/run/postgresql.conf'
The "-D" option on the command line overrides the "data_dir"
in the configuration file.
The "-R" option on the command line overrides the
"runtime_pidfile" in the configuration file.
If no hba_conf and/or ident_conf setting is specified, the default
$PGDATA/pg_hba.conf and/or $PGDATA/pg_ident.conf will be used.
If the "-C" option specifies a diretcory, pg_hba.conf and pg_ident.conf
files must be in the specified directory.
This patch is intended to move the PostgreSQL configuration out of the
data directory so that it can be modified and backed up.
This patch is also useful for running multiple servers with the same
parameters:
postmaster -C /etc/postgres/postgresql.conf -D /VOL01/postgres -p 5432
postmaster -C /etc/postgres/postgresql.conf -D /VOL02/postgres -p 5433
To apply the patch, enter your PostgreSQL source directory, and run:
cat pgec-PGVERSON.patch | patch -p 1
Attachments:
pgec-7.3.2.patchtext/plain; name=pgec-7.3.2.patchDownload+345-109
On Tue, 2003-02-18 at 21:43, mlw wrote:
This patch enables PostgreSQL to be far more flexible in
its configuration methodology.
Without weighing in on the configuration debate, one thing this patch
definitely needs to do is update the documentation.
Cheers,
Neil
--
Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC
On Wed, 2003-02-19 at 02:43, mlw wrote:
PostgreSQL Extended Configuration Patch
...
--- Run-time process ID --- postmaster -R /var/run/postmaster.pidThis will direct PostgreSQL to write its process ID number
to a file, /var/run/postgresql.conf--- postgresql.conf options ---
...
The "-R" option on the command line overrides the
"runtime_pidfile" in the configuration file.
I raised the possibility of moving the pid file only last week. Tom
pointed out that it acts as a lock on the database to prevent two
postmasters' trying to manage the same database. As such it should NOT
be a configurable parameter.
--
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight, UK http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"And the angel answered and said unto the women, Fear
ye not; for I know that ye seek Jesus, who was
crucified. He is not here; for he is risen, as he
said...Therefore be ye also ready; for in such an hour
as ye think not the Son of man cometh."
Matthew 28:5,6; 24:44
Oliver Elphick wrote:
On Wed, 2003-02-19 at 02:43, mlw wrote:
PostgreSQL Extended Configuration Patch
...
--- Run-time process ID --- postmaster -R /var/run/postmaster.pidThis will direct PostgreSQL to write its process ID number
to a file, /var/run/postgresql.conf--- postgresql.conf options ---...
The "-R" option on the command line overrides the
"runtime_pidfile" in the configuration file.I raised the possibility of moving the pid file only last week. Tom
pointed out that it acts as a lock on the database to prevent two
postmasters' trying to manage the same database. As such it should NOT
be a configurable parameter.
This is a different PID file. Sorry, this one is specifically for FHS
systems. The postmaster.pid file, as used by PostgreSQL remains in the
data directory.
Show quoted text
mlw wrote:
I raised the possibility of moving the pid file only last week. Tom
pointed out that it acts as a lock on the database to prevent two
postmasters' trying to manage the same database. As such it should NOT
be a configurable parameter.This is a different PID file. Sorry, this one is specifically for FHS
systems. The postmaster.pid file, as used by PostgreSQL remains in the
data directory.
Uh, how does this work if you don't do an FHS install --- where does it
put this FHS postmaster.pid file?
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Bruce Momjian wrote:
mlw wrote:
I raised the possibility of moving the pid file only last week. Tom
pointed out that it acts as a lock on the database to prevent two
postmasters' trying to manage the same database. As such it should NOT
be a configurable parameter.This is a different PID file. Sorry, this one is specifically for FHS
systems. The postmaster.pid file, as used by PostgreSQL remains in the
data directory.Uh, how does this work if you don't do an FHS install --- where does it
put this FHS postmaster.pid file?
If there is no runtime_pidfile setting, (either in the configuration
file or with "-R") no file is writen.