Commit ee6b9290 authored by Christoph Berg's avatar Christoph Berg

/etc/postgresql-common/createcluster.conf: Also allow to disable the

creation of "main" clusters when postgresql server packages are installed.
parent fecb00ef
# Default values for pg_createcluster(8)
# Create a "main" cluster when a new postgresql-x.y server package is installed
#create_main_cluster = true
# Default start.conf value, must be one of "auto", "manual", and "disabled".
# See pg_createcluster(8) for more documentation.
#start_conf = 'auto'
......
......@@ -3,7 +3,8 @@ postgresql-common (142) UNRELEASED; urgency=low
* Make all scripts honor PGSYSCONFDIR (defaulting to
/etc/postgresql-common).
* The default behavior of pg_createcluster can be configured in
/etc/postgresql-common/createcluster.conf.
/etc/postgresql-common/createcluster.conf. This also allows to disable the
creation of "main" clusters when postgresql server packages are installed.
* debian/postgresql-common.postgresql.init: Do not die of one cluster fails
to start. (Closes: #699911)
......
......@@ -32,7 +32,10 @@ configure_version() {
[ "$VERSION" ] || { echo "Error: configure_version: need version parameter" >&2; exit 1; }
if [ ! -d "/etc/postgresql/$VERSION" ] || [ -z "$(ls /etc/postgresql/$VERSION)" ] || \
[ -z "$(ls /etc/postgresql/$VERSION/*/postgresql.conf 2>/dev/null)" ]; then
[ "$2" ] || /usr/bin/pg_createcluster -u postgres $VERSION main || {
# skip creating the main cluster when this is not the first install, or
# when explicitely disabled ($create is 1/0/"")
create=$(perl -I/usr/share/postgresql-common -mPgCommon -e 'print PgCommon::config_bool(PgCommon::get_conf_value 0, 0, "createcluster.conf", "create_main_cluster")')
[ "$2" ] || [ "$create" = "0" ] || /usr/bin/pg_createcluster -u postgres $VERSION main || {
echo "Error: could not create default cluster. Please create it manually with
pg_createcluster $VERSION main --start
......
......@@ -743,6 +743,10 @@ C</etc/postgresql-common/createcluster.conf>:
=over 4
=item B<create_main_cluster> (Default: B<true>)
Create a B<main> cluster when a new postgresql-x.y server package is installed.
=item B<start_conf> (Default: B<auto>)
Default C<start.conf> value to use.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment