Thread: Re: Upgrade Ubuntu 22 -> 24 may break PostgreSQL

Re: Upgrade Ubuntu 22 -> 24 may break PostgreSQL

From
Adrian Klaver
Date:
On 8/31/24 09:54, Peter J. Holzer wrote:
> 'Tis the season again.
> 
> Ubuntu 24.04.1 has just been released, so many Ubuntu LTS users will now
> be prompted to upgrade from 22.04 to 24.04.

Which I ignore.

> 
> A word of warning to those who use Postgresql from the Ubuntu repo (not
> PGDG):

Why I do use the PGDG repo's.

> 
> As usual, a newer Ubuntu version comes with a newer Postgres version (16
> instead of 14). Also as usual, I got a message during the upgrade that
> Postgres 14 is obsolete,. but the binaries have been left installed and
> I should upgrade to Postgres 16 manually ASAP.
> 
> But after the reboot, PostgreSQL failed to start because it needed a
> shared library (libldap) which was no longer there. So a normal
> pg_upgradecluster wouldn't work.

sudo apt install libldap-X.x did not work?

> 
> In my case the quickest way to recover was to install postgresql-14 on a
> VM, copy the data direcory into that instance and make a fresh dump,
> then install postgresql-16 on my laptop and restore the dump. Annoying,
> but no big deal for the small test database I keep on my laptop. If you
> have multi-terabyte databases, your situation may be different.
> 
> I'm not exactly sure what went wrong (I got some conflicts during the
> upgrade and maybe I shouldn't have invoked apt autoremove?), and you may
> not have this problem, but make sure you have a backup before the
> upgrade.
> 
>          hp
> 
> 

-- 
Adrian Klaver
adrian.klaver@aklaver.com




Re: Upgrade Ubuntu 22 -> 24 may break PostgreSQL

From
Adrian Klaver
Date:
On 8/31/24 11:02, Peter J. Holzer wrote:
> On 2024-08-31 10:35:01 -0700, Adrian Klaver wrote:
>> On 8/31/24 09:54, Peter J. Holzer wrote:
>>> 'Tis the season again.
>>>
>>> Ubuntu 24.04.1 has just been released, so many Ubuntu LTS users will now
>>> be prompted to upgrade from 22.04 to 24.04.
>>
>> Which I ignore.

> But I think our personal preferences are besides the point. Many people
> will upgrade Ubuntu in the next weeks or months. So I wanted to give
> them a heads-up that this might not be as smooth as expected.

Major updates rarely are. That is why I tend to look before I leap. One 
way to make the leap easier is to change the Postgres repo from the 
Ubuntu to the PGDG repo on the current Ubuntu version being run then do 
the Ubuntu upgrade. The caveat being what the current version of 
Ubuntu/Postgres is you are running and whether that Postgres version is 
still supported in the main PGDG repo. Otherwise you are going to:

https://apt-archive.postgresql.org/




-- 
Adrian Klaver
adrian.klaver@aklaver.com