pg_upgrade - add config directory setting

From: Steve Crawford <scrawford(at)pinpointresearch(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: pg_upgrade - add config directory setting
Date: 2011-09-27 23:13:41
Message-ID: 4E8258A5.7060702@pinpointresearch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

It would perhaps be useful to add optional --old-confdir and
--new-confdir parameters to pg_upgrade. If these parameters are absent
then pg_upgrade would work as it does now and assume that the config
files are in the datadir.

The reason for this suggestion is that packages for Ubuntu (and I
suppose Debian and possibly others) place the config files in a
different directory than the data files.

The Ubuntu packaging, for example, puts all the configuration files in
/etc/postgresql/VERSION/main/.

If I set the data-directories to /var/lib/postgresql/VERSION/main then
pg_upgrade complains about missing config files.

If I set the data directories to /etc/postgresql/VERSION/main/ then
pg_upgrade complains that the "base" subdirectory is missing.

Temporarily symlinking postgresql.conf and pg_hba.conf from the config
directory to the data directory allowed the upgrade to run successfully
but is a bit more kludgey and non-obvious.

Cheers,
Steve

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jamie Fox 2011-09-27 23:19:38 Mismatch of relation names: pg_toast.pg_toast_nnn during pg_upgrade from 8.4 to 9.1
Previous Message Steve Singer 2011-09-27 23:10:39 Re: Online base backup from the hot-standby