#1095418 Cluster upgrade cannot be completed if former version is not present

Package:
postgresql
Source:
postgresql
Submitter:
Rudy Godoy
Date:
2025-02-07 19:51:01 UTC
Severity:
normal
Tags:
#1095418#5
Date:
2025-02-07 16:48:42 UTC
From:
To:
I've experienced this when upgrading my system from stable to testing.
Somehow the stable's version (postgresql-15) was removed before the
install of the testing's version (postgresql-17). When configuring, it
couldn't complete the cluster upgrade because it didn't found
pg_controldata from version 15.

Even though the configuration dialog also described the alternative to
do the upgrade from cli tools, it was also not feasible to execute,
because of the same problem. It is important to also note that  version
15 is not present anymore in testing, which renders the database cluster
in failure state. You  you cannot start the new version 17, because the
debconf configuration hasn't finished correctly and the SystemD files
are not in place.

I've solved the issue by manually downloading the stable package file
for postgresql-15 and installing it using dpkg, so that pg_controldata
is available. Then, I was able to reconfigure version 17 and do the
cluster upgrade from debconf, which finished with no errors.

#1095418#8
Date:
2025-02-07 17:17:29 UTC
From:
To:
Re: Rudy Godoy

Hi,

you must not remove the old version before you do the upgrade. There
is even logic in place to disable autoremoval of postgresql packages
as long as any version 15 cluster is present.

What specifically did you do during the upgrade that led to the 15
packages being removed?

Christoph

#1095418#15
Date:
2025-02-07 19:50:23 UTC
From:
To:
Hello Christoph,

It wasn't my intention to remove any package. Actually, it didn't even
realized it was a major version upgrade for postgresql.
I've did regular upgrade: apt update && apt upgrade. It wasn't able to
upgrade all packages. Then, I've attempted to proceed with "manual
upgrade" for some of those packages (apt install samba-libs), then it
began removing a lot of things, that I didn't want at all.

Perhaps it is related to some library transition that is in progress.