Re: Postgres 12 update to new major version

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Boris Dovčík <bdovcik(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Postgres 12 update to new major version
Date: 2026-06-05 21:59:20
Message-ID: 71e9dfb092c0b78a4e6860c7fadfd9d47f55fa32.camel@cybertec.at
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 2026-06-05 at 14:11 +0200, Boris Dovčík wrote:
> I have a question regarding the update of the production database (multiple TB of data)
> from version 12 to higher major version. We would like to jump to 15 or 16. DB is installed
> on a Linux server with one replica on another, it is not on cloud.
>
> First question is should we perform updates one by one? 12 -> 13 -> 14 etc. or is it
> viable to jump to 16 right away? (We have few functions but usually its plain tables)

You can jump over versions, but you should not upgrade to an old release like v15 or
v16. Go to v18 or better. It looks like you are not too eager to upgrade frequently,
otherwise you would not be on v12 today. So I recommend that you put the time when
the next upgrade will be necessary as far into the future as possible.

> Second we are contemplating options for the update since we are limited with downtime.
> We could get 4 hours of downtime for the whole update (either via pg_update or dumps).
> We are not sure how to estimate the time for direct update or dumps. What would be the
> recommended way for it?

You should use pg_upgrade --link. Then the upgrade can be a matter of minutes, unless
you have lots and lots of tables, functions or large objects.

Yours,
Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Ross 2026-06-05 22:38:25 Re: Postgres 12 update to new major version
Previous Message Adrian Klaver 2026-06-05 20:30:55 Re: Postgres 12 update to new major version