[Pkg-postgresql-public] Bug#681344: Bug#681344: postgresql-common: pg_upgradecluster should use pg_ctlcluster stop --force to shut down the cluster
Martin Pitt
mpitt at debian.org
Sat Jul 21 15:32:52 UTC 2012
severity 681344 wishlist
thanks
Hello Martin,
Martin von Wittich [2012-07-12 15:16 +0200]:
> Currently, pg_upgradecluster uses the following code to shut down the
> cluster:
>
> # stopping old cluster, so that we notice early when there are still
> # connections
> print "Stopping old cluster...\n";
> my @argv = ('pg_ctlcluster', $version, $cluster, 'stop', '--', '-t', '5');
> error "Could not stop old cluster" if system @argv;
>
> This will cause pg_ctlcluster to shut down the cluster with the "smart"
> mode, which will fail after 5 seconds when there are still open
> connections to postgres:
This is by intent, as it is a safe default.
> pg_upgradecluster should either use --force by default
I don't think it's a good idea. Usually upgrading a DB to a new major
version requires some attention anyway, and should not done with any
level of bruteness.
> or a parameter should be added so that users can specify that they
> want a forced shutdown.
That seems okay, but rather redundant. You can always pg_ctlcluster
--force stop the cluster yourself before upgrading. Keeping bug open
to add it to pg_upgradecluster.
Thanks,
Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
More information about the Pkg-postgresql-public
mailing list