Re: location of the configuration files - Mailing list pgsql-hackers

From Oliver Elphick
Subject Re: location of the configuration files
Date
Msg-id 1045157315.3089.459.camel@linda.lfix.co.uk
Whole thread Raw
In response to Re: location of the configuration files  (Vince Vielhaber <vev@michvhf.com>)
Responses Re: location of the configuration files
Re: location of the configuration files
List 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.Elphick@lfix.co.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
thatdwell therein."                                              Psalms 24:1 
 



pgsql-hackers by date:

Previous
From: Oliver Elphick
Date:
Subject: Re: location of the configuration files
Next
From: Vince Vielhaber
Date:
Subject: Re: location of the configuration files