From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>, Oliver Elphick <olly(at)lfix(dot)co(dot)uk>, Vince Vielhaber <vev(at)michvhf(dot)com>, "J(dot) M(dot) Brenner" <doom(at)kzsu(dot)stanford(dot)edu>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: location of the configuration files |
Date: | 2003-02-14 20:19:36 |
Message-ID: | 200302142019.h1EKJau02279@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Peter Eisentraut wrote:
> 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.
Who is asking to put postgresql.conf, pg_hba.conf, and pg_ident.conf in
different directories? I haven't heard anyone ask for that.
> > 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.
What happens if postgresql.conf then defines data_dir? Seems we ignore it.
This brings up the same issue of whether -C/PGCONFIG is a inferior
option to -D/PGDATA, and whether we keep the config files in /data by
default.
> > 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.
Here we are saying the -C doesn't override postgresql.conf as the proper
PGDATA value. Is that what we want? We had the question above over how
a data_dir in postgresql.conf is handled.
>
> > 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.)
Yes, the big question seems to be if we are defaulting -C to be the same
as -D, whether that is an actual specification of -D that should
override postgresql.conf.
This is part of the reason I don't like the -D assumes -C and stuff like
that.
I think we need to move the config files to pgsql/etc, for backup and
initdb safety, and move toward having PGCONFIG/-C as the driving
parameter. I think having both function equally and defaulting if the
other is not specified is going to breed confusion.
I am willing to make thing a little difficult for backward compatibility
to do this, and I think because it is only administrators, they will
welcome the improvement.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-02-14 20:27:53 | Re: location of the configuration files |
Previous Message | Tom Lane | 2003-02-14 20:18:57 | Re: Brain dump: btree collapsing |