I started to think about postgresql.conf.

Do you think it is a good idea, and how hard would it be, if postmaster and the
various utilities were able to read their whole setup from a postgresql.conf
file? Many UNIX utilities do this.

Think of this:

su pgsql -c "postmaster -C /etc/pgsql/mydb1.conf"


 From this, postmaster can find all its settings in the config file. That way
you don't have to mess with startup scripts, environment variables, or anything
it just comes from the configuration file. Right now it is to hard to run two
different versions/instances of postgresql on the same machine.

Also, is there a real need to have a separate pg_hba.conf file? Couldn't
postgresql.conf also contain these settings?

I know this isn't of great concern to this group, but one of the things that
PostgreSQL does that kind of bugs me, is that it keeps its configuration and
data in the same place.

Sun, 02 Dec 2001 11:04:36 -0500
mlw <markw@mohawksoft.com>
configuration files and PGDATA variable
mlw <markw@mohawksoft.com> writes:
> Think of this:
> su pgsql -c "postmaster -C /etc/pgsql/mydb1.conf"

> From this, postmaster can find all its settings in the config
> file. That way you don't have to mess with startup scripts,
> environment variables, or anything it just comes from the
> configuration file.

This is largely possible now, with the exception of locale
environment variables (not sure that we should ignore those) and
database-path environment variables (an ugly hack whose days are
numbered anyway).  However, we spell the thing slightly differently:

> su pgsql -c "postmaster -D /path/to/data/dir"

and expect to find the config files therein.

> Right now it is to hard to run two
> different versions/instances of postgresql on the same machine.

Au contraire, it's easy; I do it all the time.  (I've got 7.0, 7.1,
and 7.2 postmasters alive right now on this machine.)  Moving the
config files out of the data directory would make it harder, IMHO.

> I know this isn't of great concern to this group, but one of the things that
> PostgreSQL does that kind of bugs me, is that it keeps its configuration and
> data in the same place.

Some of us think that's a feature, not a bug.  I realize that it's open
to argument; but you'd better give practical arguments, not just assert
that it's the wrong approach.

			regards, tom lane

Sun, 02 Dec 2001 20:01:14 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: configuration files and PGDATA variable 