Yet another configuration patch with include, and configuration dir

From: mlw <pgsql(at)mohawksoft(dot)com>
To: pgsql-hackers(at)postgresql(dot)org, pgsql-patches-owner(at)postgresql(dot)org, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Subject: Yet another configuration patch with include, and configuration dir
Date: 2003-02-17 20:25:47
Message-ID: 3E51454B.3030906@mohawksoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

This is a patch that allows PostgreSQL to use a configuration
file that is outside the main database directory.

It adds one more command line parameter, "-C" which
specifies either the location of the postgres configuration
file or a directory containing the configuration files.

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: posgresql.conf, pg_hba.conf, and pg_ident.conf.

--- postgresql.conf ---
Within the main configuration file are four additional
parameters: include, hba_conf,ident_conf, and data_dir.

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'

The "-D" option on the command line overrides the "data_dir"
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.

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 PostreSQL source directory, and run:

cat pgec-PGVERSON.patch | patch -p 1

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas Schmitz 2003-02-17 20:42:11 Re: Still a bug in the VACUUM ??? !!!
Previous Message mlw 2003-02-17 20:14:02 Re: new Configuration patch, implements 'include'