Re: location of the configuration files - Mailing list pgsql-hackers
From | Bruce Momjian |
---|---|
Subject | Re: location of the configuration files |
Date | |
Msg-id | 200302142019.h1EKJau02279@candle.pha.pa.us Whole thread Raw |
In response to | Re: location of the configuration files (Peter Eisentraut <peter_e@gmx.net>) |
List | 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@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: