Re: Safest pgupgrade jump distance - Mailing list pgsql-general

From Greg Sabino Mullane
Subject Re: Safest pgupgrade jump distance
Date
Msg-id CAKAnmmK6HTKSmfNqVjfQ4L-tbHrD6+qaGpHN=mO0qb9nwom9fA@mail.gmail.com
Whole thread Raw
In response to Safest pgupgrade jump distance  (Dávid Suchan <david.suchan.ds@gmail.com>)
List pgsql-general
On Mon, Feb 12, 2024 at 5:08 AM Dávid Suchan <david.suchan.ds@gmail.com> wrote:
Hi, I was wondering what is the safest pg_upgrade version upgrade distance going from 9.6 version. Do I need to go version by version or I can go from 9.6 to 15?

You can go direct. You really should go to 16 though. If nothing else, you gain lots of performance improvements and another year before your version goes EOL (end of life).
 
We have a very huge database(TBs) with one replication server, so we will first run the pgupgrade on the main server and then rsync to a standby replica.

I assume you mean the three-way rsync recipe in the docs.

Also, when upgrading a very big database with replication where none of the data can be allowed to be lost, is the pgupgrade into rsync approach the best one? Thanks.

Not sure about "best", it is certainly the fastest. For data loss concerns, that's where your backup system (e.g. pgBackRest) is key.

Cheers,
Greg

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Safest pgupgrade jump distance
Next
From: Adrian Klaver
Date:
Subject: Re: Query hangs (and then timeout) after using COPY to import data