Re: location of the configuration files - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: location of the configuration files
Date
Msg-id Pine.LNX.4.44.0302141208290.1618-100000@peter.localdomain
Whole thread Raw
In response to Re: location of the configuration files  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: location of the configuration files
Re: location of the configuration files
List pgsql-hackers
Tom Lane writes:

> I would favor a setup that allows a -C *directory* (not file) to be
> specified as a postmaster parameter separately from the -D directory;

A directory is not going to satisfy people.

> I don't see any great value in a separate postgresql.conf parameter for
> each secondary config file; that just means clutter to me,

Not to other people.

> 1. No -C switch, no -D switch, no PGDATA found in environment: seek
> postgresql.conf in the default -C directory established at configure
> time.  Use the 'datadir' specified therein as -D.  Fail if postgresql.conf
> doesn't define a datadir value.

OK.

> 2. No -C switch, no -D switch, PGDATA found in environment: use $PGDATA
> as both -C and -D.

This behavior would be pretty inconsistent.  But maybe it's the best we
can do.

> 3. No -C switch, -D switch on command line: use -D value as both -C and -D,
> proceed as in case 2.

Same as above.

> 4. -C switch, no -D switch on command line: seek postgresql.conf in
> -C directory, use the datadir it specifies.

OK.

> 5. -C and -D on command line: seek postgresql.conf in -C directory,
> use -D as datadir overriding what is in postgresql.conf (this is just
> the usual rule that command line switches override postgresql.conf).

But that usual rule seems to be in conflict with cases 2 and 3 above.
(The usual rule is that a command-line option overrides a postgresql.conf
parameter.  The rule in 3, for example is, that a command-line option (the
same one!) overrides where postgresql.conf is in the first place.)

> I would venture that the configure-time-default for -C should be
> ${prefixdir}/etc if configure is not told differently,

Yeah, we already have that as --sysconfdir.

-- 
Peter Eisentraut   peter_e@gmx.net



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pg_dump and inserts
Next
From: Tom Lane
Date:
Subject: Re: location of the configuration files