launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #04407
Using a different PostgreSQL cluster.
I followed the steps in https://dev.launchpad.net/DatabaseSetup and
where it said "main" I substituted "launchpad". This created a
separate cluster, so it didn't destroy my main one. Launchpad seems to
respect the PGPORT environment variable so I use a (sourceable, not
executable) script to switch to the port assigned to the launchpad
cluster before starting work:
{{{
#
# Switch PGPORT to point to a different local cluster.
#
# Use without arguments to select the port of the "main" cluster:
#
# . pgport
#
# However, if there is a "main" cluster in more than one PostgreSQL
# version then the result here will not be very useful. So, specify a
# version:
#
# . pgport main 8.4
#
# If you want a different cluster, change "main" to something else:
#
# . pgport launchpad
#
export PGPORT="$(awk --field-separator '[= \t]+' '/^port/ { print $2 }' \
/etc/postgresql/${2:-*}/${1:-main}/postgresql.conf)"
}}}
Does anyone have an opinion if I should integrate this into the
development docs or not?
Gavin.
Follow ups