Configure redux. "WITH LOCATION," what do you think? - Mailing list pgsql-hackers

From pgsql@mohawksoft.com
Subject Configure redux. "WITH LOCATION," what do you think?
Date
Msg-id 16744.24.91.171.78.1084302342.squirrel@mail.mohawksoft.com
Whole thread Raw
List pgsql-hackers
I'm sorry to keep bringing this up, but I keep thinking that PostgreSQL is
a PITA to configure. It isn't that I don't know how, or can't read the
documents, it's just that there is too many things that can go wrong or
leave me with the "How does that work?" feeling where I need to test
before I implement.

OK, here is what I think we need to do, and I am willing to take the point
and do all of it:

If postmaster is started with -D or with $PGDATA set to the location of a
postgresql cluster directory, it will work as it has always worked.

If the -D or the $PGDATA values do not point to a database cluster
directory, it must point to either a postgresql.conf file, or a directory
which contains "postgresql.conf." If it points to a directory, then that
directory will be the assumed the default for pg_hba.conf and
pg_ident.conf.

The test for it being a cluster directory or a configuration directory
will be the presence of "PG_VERSION." (any better suggestion would be
welcome

Within the postgresql.conf file, there will be about 4 additional
configuration parameters:

include='/somepath/coreopts.conf'
hba_conf='/somepath/pg_hba.conf'
ident_conf='somepath/pg_ident.conf'
pgdata='/somepath/to/cluster'

(Unfortunately we lose the ability to use a standard configuration across
multiple databases, but I think this is a good compromise.)

Additionally, rather than depend on environment variables for security, we
can put acceptable database locations in the postgresql.conf file in the
form of:

altdb='/somealtpath'

and we can use createdb as:

CREATE DATABASE somedb with LOCATION 'altdb';

What do you all think?



pgsql-hackers by date:

Previous
From: Andrew Hammond
Date:
Subject: Re: Hacking MySQL Database
Next
From: Thomas Hallgren
Date:
Subject: Module dependency on PostgeSQL version