Bug 55066 - postgresql@11-main.service masked despite postgres11/autostart=yes
postgresql@11-main.service masked despite postgres11/autostart=yes
Status: REOPENED
Product: UCS
Classification: Unclassified
Component: PostgreSQL
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: Erik Damrose
Arvid Requate
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2022-08-04 08:39 CEST by Oliver Friedrich
Modified: 2022-08-09 19:02 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 3: Will affect average number of installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.171
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Regression
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Friedrich univentionstaff 2022-08-04 08:39:18 CEST
We discovered, that the postgresql@11-main.service is unable to start after an update from UCS 4.4-9 to UCS 5.0-1 and following the steps from https://help.univention.com/t/updating-from-postgresql-9-6-or-9-4-to-postgresql-11/17531

Reasons:
1. Although postgres11/autostart is set to 'yes', the service is masked. Workaround: systemctl unmask postgresql@11-main.service
2. On our system, the service "...failed because the service did not take the steps required by its unit configuration" caused by the missing folder /etc/postgresql/11/main/conf.d/. Workaround: see linked help article

Expectation: these two steps should be assured in the package univention-posrgresql-11 (or any following version)
Comment 1 Philipp Hahn univentionstaff 2022-08-04 08:49:20 CEST
Upgrading PostgreSQL *always* requires manual steps: You can install multiple versions of PostgreSQL at the same time, but only one can bind to TCP port 5432. On upgrades you have to at least disable the old version 9.[46] en enable the ne version 11.
You also have to migrate the data whenever the major version changes. This is to fragile for full automation and *always* needs manual inspection. It may also leads to a down-time (depending on the size of your database), which an Administrator should schedule. Therefore the installation of the new version and performing the upgrade are two separate steps.

Because of that we have that help article. If steps are missing there update it.
There is nothing to change in univention-postgresql-11 as it works for *new* installations; for *upgrades* the required steps must be performed manually.
Comment 2 Erik Damrose univentionstaff 2022-08-09 09:18:40 CEST
systemctl unmask postgresql@11-main.service

has been added to the help article. Worksforme
Comment 3 Arvid Requate univentionstaff 2022-08-09 19:01:32 CEST
> Although postgres11/autostart is set to 'yes', the service is masked. Workaround: systemctl unmask postgresql@11-main.service

This is unexpected behavior and should be analyzed. Does it affect other services too?