Re: location of the configuration files

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: mlw <pgsql(at)mohawksoft(dot)com>
Cc: 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>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: location of the configuration files
Date: 2003-02-13 19:17:51
Message-ID: 200302131917.h1DJHpX04946@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

mlw wrote:
> >It doesn't have anything to do with "not-invented-here", which is a
> >common refrain by people who don't like our decisions, like "Why don't
> >you use mmap()? Oh, it's because I thought of it and you didn't". Does
> >anyone seriously believe that is the motiviation of anyone in this
> >project! I certainly don't.
> >
> >Now, on to this configuration discussion. Seems moving the config file
> >out of $PGDATA requies either:
> >
> > 1) we specifiy both the config directory and the data directory on
> > postmaster start
> >
> > 2) we specify the pgdata directory inside postgresql.conf or
> > other config file
> >
> >Is this accurate?
> >
> >
> The patch that I have adds three settings to postgresql.conf and one
> command line parameter.
>
> hba_conf = 'filename'
> ident_conf='filename'
> data_dir='path'
>
> The command linae parameter is -C, used as:
>
> postmaster -C /usr/local/etc/postgresql.conf
>
> I think this will help administrators.
>
> Bruce, can you shed some light as to why this is being so strongly
> rejected. I just don't see any downside. I just don't get it.
>
> I will be resubmitting my patch for the 7.3.2 tree.

Well, in a sense, it trades passing one parameter, PGDATA, for another.
I see your point that we should specify configuration first, and let
everything pass from there. However, it does add extra configuration
parameters, and because you still need to specify/create pgdata, it adds
an extra level of abstraction to setting up the server.

Also, there is nothing preventing someone from symlinking the
configuration files from pgdata to somewhere else.

I don't think separate params for each config file is good. At the
most, I think we will specify the configuration _directory_ for all the
config files, perhaps pgsql/etc, and have pgdata default to ../data, or
honor $PGDATA. That might be the cleanest.

Of course, that now gives us $PGCONFIG and $PGDATA, and possible
intraction if postgresql.conf specifies a different pgdata from $PGDATA.
As you can see, it could get messy.

And, if you specify pgdata in postgresql.conf, it prevents you from
using that file by different postmasters.

My best guess would be to not specify pgdata in postgresql.conf, and
have a new $PGCONFIG param to specify the configuration directory, but
if we do that, $PGDATA/postgresql.conf becomes meaningless, which could
also be confusing. Maybe we don't allow those files to exist in $PGDATA
if $PGCONFIG is used, _and_ $PGCONFIG is not the same as $PGDATA. See,
I am getting myself confused. :-)

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Ledesma 2003-02-13 19:21:50 Re: [ADMIN] help me!!
Previous Message Oliver Elphick 2003-02-13 19:15:36 Re: location of the configuration files