Re: location of the configuration files

From: mlw <pgsql(at)mohawksoft(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
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:48:28
Message-ID: 3E4BF68C.1090606@mohawksoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian wrote:

>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.
>
While this is true, it is not uncommon, and it is more or less expected
by most UNIX admins.

>
>Also, there is nothing preventing someone from symlinking the
>configuration files from pgdata to somewhere else.
>
Stop!!! symlinks are not sufficient. When happens when a native Win32
version comes out? there are no symlinks. Also, most of the admins I
know don't like to use simlinks as they are not self documenting.
Symlinks are "bad."

>
>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.
>
The problem with that is that you are back to symlinking shared files.
Symlinks are a kludge.

>
>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.
>
I don't see it as very messy, for instance:

postmaster -C /etc/postgres/postgresql.conf -D /RAID0/postgres -p 5432
postmaster -C /etc/postgres/postgresql.conf -D /RAID1/postgres -p 5433

That looks like a real clean way to run multiple PostgreSQL servers on
the same box using the same configuration files.

>And, if you specify pgdata in postgresql.conf, it prevents you from
>using that file by different postmasters.
>
Not true, command line parameters, as a rule, override configuration
file defaults.

>
>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. :-)
>
I think you are making it too complicated.

I wouldn't remove the default configration set, it would be useful as a
failsafe or maintainence feature.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephan Szabo 2003-02-13 19:50:59 Re: location of the configuration files
Previous Message Oliver Elphick 2003-02-13 19:47:12 Re: location of the configuration files