- Package:
- postgresql-common
- Source:
- postgresql-common
- Submitter:
- Karsten Hilbert
- Date:
- 2023-10-10 00:33:02 UTC
- Severity:
- important
On a Debian/Squeeze I installed PG 9.0 from unstable. I then ran "pg_dropcluster 9.0 main" and "pg_upgradecluster 8.4 main" which failed to properly transfer a few databases because they are configured as "alter database set default_transaction_readonly to on" It nonetheless configured the old cluster to port 5433 and the new one to 5432. I "remove --purge"d PG 9.0 (and libpq5-9), dropped the new (faulty) 9.0 cluster, reconfigured 8.4 in postgresql.conf to, again, use port 5432. Now, upon startup, the 8.4 cluster is not properly started. Neither of invoke-rc.d postgresql start 8.4 main /etc/init.d/postgresql start 8.4 main does the right thing. However, when I go pg_ctlcluster 8.4 main start it starts up just fine. I wonder what the problem could be here. Karsten
Hello Karsten, Karsten Hilbert [2010-10-04 12:27 +0200]: The reason is that on upgrade the old cluster gets configured for "manual" startup, i. e. not automatically started by the init scripts (since usually you want to use the upgraded one). Seems pg_upgradecluster doesn't clean up properly here. Please change /etc/postgresql/8.4/main/start.conf back to "auto" (see comments in that file) for now. Thanks for your report, Martin
While the failing of pg_upgradecluster (and the failure to detect that) does indeed seem a bug the part about the old cluster not automatically starting anymore is not. Rather it is standard behaviour as documented in the pg_upgradecluster man page: the old cluster will be set to manual mode in /etc/postgresql/8.4/main/start.conf. Resetting that to "automatic" fixes this part of the issue so this report can be considered solved, I suppose. Karsten
Dear Maintainer, It seems to me that the issue here is that even when the upgrade fails, pg_upgradecluster reports success and puts the new database into use. I am ran into this problem when upgrading from PG 15 to 16. An error in the upgrade created a broken database for a different reason than the original reporter of this bug, but pg_upgradecluster reported success. This was my PG bug report: https://www.postgresql.org/message-id/18151-cdc2191b130172c7%40postgresql.org My error was: pg_restore: error: could not execute query: ERROR: relation "event" does not exist An error like this should leave the old DB running and output an error message. Thanks, Liam