Comment 7 for bug 138793

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 138793] Re: no warning about decoy conf files

Hi,

Rick Graves [2007-10-31 9:11 -0000]:
> Having just run this again, I can report that the conf
> files are deposited in the data directory when you run
> initdb.

Ah, of course. If you run initdb manually, then you cannot expect the
postgresql-common integration scripts to work magically. The prefered
way is to use pg_createcluster, which will do all this shuffling for
you and register the cluster in the postgresql-common structure, init
scripts, enable the possibility to upgrade it painlessly with
pg_upgradecluster, etc.

But then I wonder how you managed to get the files in /etc/? It seems
that you once had the default 8.1/main cluster, deleted the data
directory in /var/lib, but not the configuration directory in /etc/,
and then used initdb to re-create the data dir in /var/?

> Also, for the postgresql server to start, I must copy
> server.crt, server.key and root.crt from
> /var/lib/postgresql/8.1/main to the data directory,
> and change the owner of those files to postgres.
> Otherwise, no go.

pg_createcluster does all this.

> For a database sever, I think most real database administrators
> would choose a long term support version over unstable!

Absolutely!