The last configuration file patch (I hope!) This one does it all.

From: mlw <pgsql(at)mohawksoft(dot)com>
To: pgsql-hackers(at)postgresql(dot)org, pgsql-patchesr(at)postgresql(dot)org, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Subject: The last configuration file patch (I hope!) This one does it all.
Date: 2003-02-19 02:43:10
Message-ID: 3E52EF3E.8060707@mohawksoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

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

Attachment Content-Type Size
pgec-7.3.2.patch text/plain 20.3 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Curt Sampson 2003-02-19 02:53:22 Re: WAL replay logic (was Re: [PERFORM] Mount options f
Previous Message Justin Clift 2003-02-19 01:47:33 Re: Real-world usage example

Browse pgsql-patches by date

  From Date Subject
Next Message Neil Conway 2003-02-19 02:59:59 Re: [HACKERS] The last configuration file patch (I hope!) This one
Previous Message Peter Eisentraut 2003-02-18 23:03:07 Re: pg_avd