Re: Yet another configuration patch with include, and configuration - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Yet another configuration patch with include, and configuration
Date
Msg-id 200305241557.h4OFvYw05466@candle.pha.pa.us
Whole thread Raw
In response to Yet another configuration patch with include, and configuration dir  (mlw <pgsql@mohawksoft.com>)
List pgsql-hackers
Where are we on this patch for specifying the location of configuration
files?  I thought the final agreement was for us to allow multiple
directories as part of -C, like $PATH, and search those paths.  I think
we then don't need additional GUC variables for each config file, and -C
should specify only directories.  mlw, do you want to make those changes
so we can get it into 7.4?

On a related note, should we move the config files into a separate
directory in the default /data install?  It makes it clear exactly which
files are user-modifyable, but it does break backward compatibility. 
However, for people who prefer symlinks, it does make it even easier to
share those files _without_ -C.

---------------------------------------------------------------------------

mlw wrote:
> 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
> 

--  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,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: PeterKorman
Date:
Subject: UPDATE pg_language SET lanpltrusted=true WHERE lanname='plpgsql'
Next
From: Tom Lane
Date:
Subject: Re: Roadmap for FE/BE protocol redesign