public inbox for [email protected]  
help / color / mirror / Atom feed
Upgrade Ubuntu 22 -> 24 may break PostgreSQL
4+ messages / 3 participants
[nested] [flat]

* Upgrade Ubuntu 22 -> 24 may break PostgreSQL
@ 2024-08-31 16:54 Peter J. Holzer <[email protected]>
  2024-08-31 17:35 ` Re: Upgrade Ubuntu 22 -> 24 may break PostgreSQL Adrian Klaver <[email protected]>
  2024-09-01 02:32 ` Re: Upgrade Ubuntu 22 -> 24 may break PostgreSQL Justin Clift <[email protected]>
  0 siblings, 2 replies; 4+ messages in thread

From: Peter J. Holzer @ 2024-08-31 16:54 UTC (permalink / raw)
  To: pgsql-general

'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.

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

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.

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


-- 
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | [email protected]         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"


Attachments:

  [application/pgp-signature] signature.asc (833B, 2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Upgrade Ubuntu 22 -> 24 may break PostgreSQL
  2024-08-31 16:54 Upgrade Ubuntu 22 -> 24 may break PostgreSQL Peter J. Holzer <[email protected]>
@ 2024-08-31 17:35 ` Adrian Klaver <[email protected]>
  1 sibling, 0 replies; 4+ messages in thread

From: Adrian Klaver @ 2024-08-31 17:35 UTC (permalink / raw)
  To: Peter J. Holzer <[email protected]>; pgsql-general

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
[email protected]







^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Upgrade Ubuntu 22 -> 24 may break PostgreSQL
  2024-08-31 16:54 Upgrade Ubuntu 22 -> 24 may break PostgreSQL Peter J. Holzer <[email protected]>
@ 2024-09-01 02:32 ` Justin Clift <[email protected]>
  2024-09-01 16:08   ` Re: Upgrade Ubuntu 22 -> 24 may break PostgreSQL Adrian Klaver <[email protected]>
  1 sibling, 1 reply; 4+ messages in thread

From: Justin Clift @ 2024-09-01 02:32 UTC (permalink / raw)
  To: Peter J. Holzer <[email protected]>; +Cc: pgsql-general

On 2024-09-01 02: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.
> 
> A word of warning to those who use Postgresql from the Ubuntu repo (not
> PGDG):
> 
> 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.

It'd *technically* be possible to automatically run an upgrade of the
PostgreSQL repository (via scripting?) at launch time, though just 
blindly
doing it for everyone would be a *major* change of behaviour.

Some people would likely love it, while others would be horrified (etc).

That being said, if we announce it ahead of time as a feature of a major
release (ie PG 18 or something), and if we have a clear way to not
automatically upgrade (a variable in postgresql.conf?), then we might be
able to solve this problem ~permanently.

We'd also need to figure out how to handle (say) rebuilding of indexes
that need updating between major versions and stuff like that.

Thoughts?

Regards and best wishes,

Justin Clift






^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Upgrade Ubuntu 22 -> 24 may break PostgreSQL
  2024-08-31 16:54 Upgrade Ubuntu 22 -> 24 may break PostgreSQL Peter J. Holzer <[email protected]>
  2024-09-01 02:32 ` Re: Upgrade Ubuntu 22 -> 24 may break PostgreSQL Justin Clift <[email protected]>
@ 2024-09-01 16:08   ` Adrian Klaver <[email protected]>
  0 siblings, 0 replies; 4+ messages in thread

From: Adrian Klaver @ 2024-09-01 16:08 UTC (permalink / raw)
  To: Justin Clift <[email protected]>; Peter J. Holzer <[email protected]>; +Cc: pgsql-general

On 8/31/24 19:32, Justin Clift wrote:
> On 2024-09-01 02:54, Peter J. Holzer wrote:
>> 'Tis the season again.

>> 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.
> 
> It'd *technically* be possible to automatically run an upgrade of the
> PostgreSQL repository (via scripting?) at launch time, though just blindly
> doing it for everyone would be a *major* change of behaviour.

The OP was using the Ubuntu repo and for a given major version of Ubuntu 
that is pinned to a given major version of Postgres. I am not seeing 
changing that would go over well. Now if a user is using the PGDG repo's 
that is a different story, then you point at the repo's for the new 
Ubuntu version do an update/upgrade and you are back on track.

> Thoughts?

This is something the end user needs to work out ahead of time as there 
is an overhead in the process they need to take into consideration. 
Cranking up a new version of Ubuntu/Debian and have it take off doing 
things behind the scenes to the Postgres instance(s) would disturb me.

> 
> Regards and best wishes,
> 
> Justin Clift
> 
> 

-- 
Adrian Klaver
[email protected]







^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2024-09-01 16:08 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-08-31 16:54 Upgrade Ubuntu 22 -> 24 may break PostgreSQL Peter J. Holzer <[email protected]>
2024-08-31 17:35 ` Adrian Klaver <[email protected]>
2024-09-01 02:32 ` Justin Clift <[email protected]>
2024-09-01 16:08   ` Adrian Klaver <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox