FS#69211 - [postgresql] Warn about a required db upgrade in post_upgrade

Attached to Project: Arch Linux
Opened by Dragoon Aethis (DragoonAethis) - Monday, 04 January 2021, 22:57 GMT
Last edited by Levente Polyak (anthraxx) - Saturday, 15 May 2021, 18:40 GMT
Task Type Feature Request
Category Packages: Extra
Status Closed
Assigned To Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Currently, whenever PostgreSQL is upgraded between major versions, the database must be migrated using postgresql-old-upgrade. Most users usually learn this the hard way when the PostgreSQL service no longer starts after a reboot - it would be nice to warn about the required upgrade in post_upgrade, not in the failing service's journal.

This concerns the postgresql package, PKGBUILD.patch + postgresql.install attached.
This task depends upon

Closed by  Levente Polyak (anthraxx)
Saturday, 15 May 2021, 18:40 GMT
Reason for closing:  Implemented
Additional comments about closing:  13.3-1
Comment by Dragoon Aethis (DragoonAethis) - Monday, 04 January 2021, 23:17 GMT
One caveat to the attached .install: The called script returns 1 if the database version doesn't match and pacman complains that the command did not complete successfully. Needs "return 0" before the function returns.
Comment by Levente Polyak (anthraxx) - Thursday, 13 May 2021, 21:47 GMT
thanks for the idea, however the install= should only be added to the postgresql package, not all split packages :)
I've changed the install script simply to "... || true"

Loading...