Re: location of the configuration files

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Vince Vielhaber <vev(at)michvhf(dot)com>
Cc: "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 17:28:35
Message-ID: 1045157315.3089.459.camel@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 2003-02-13 at 12:00, Vince Vielhaber wrote:
> > Which means if the the vendor installed Postgresql (say, the
> > Red Hat Database) you'd expect config files to be in /etc.
> > If the postgresql is compiled from source by local admin,
> > you might look somewhere in /usr/local.
>
> Then why not ~postgres/etc ?? Or substitute ~postgres with the
> db admin user you (or the distro) decided on at installation time.
> Gives a common location no matter who installed it or where it was
> installed.

Because it doesn't comply with FHS. All projects should remember that
they coexist with many others and should do their best to stick to
common standards.

The default config file location should be set as a parameter to
./configure, which should default to /usr/local/etc/postgresql. Those
of us who build for distributions will change it to /etc/postgresql.

I suppose if we want to run different postmasters simultaneously, we
could have /etc/postgresql/5432/ and so on for each port number being
used. Perhaps have a default set in /etc/postgresql/ which can be used
if there is no port-specific directory, but a postmaster using those
defaults would have to have PGDATA specified on the command line.

On the same lines, I have just had a request (as Debian maintainer) to
move the location of postmaster.pid to the /var/run hierarchy; firstly,
so as to make it easier for the administrator to find, and secondly so
as to make it easier to configure SE Linux policy for file access. (SE
Linux is the highly secure version produced by the NSA.)

I'm not entirely sure why SE Linux has a problem, seeing that postgres
needs read-write access to all the files in $PGDATA, but assuming the
need is verified, I could do this by moving the pid file from
$PGDATA/postmaster.pid to /var/run/postgresql/5432.pid and similarly for
other ports. This would also have the benefit of being more FHS
compliant What do people think about that?

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight, UK http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"The earth is the LORD'S, and the fullness thereof; the
world, and they that dwell therein."
Psalms 24:1

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vince Vielhaber 2003-02-13 17:52:23 Re: location of the configuration files
Previous Message Oliver Elphick 2003-02-13 17:28:14 Re: location of the configuration files