From: Justin Clift <justin@postgresql.org>
To: Dávid Suchan <david.suchan.ds@gmail.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: Safest pgupgrade jump distance
Date: Mon, 12 Feb 2024 20:15:31 +1000
Message-ID: <1a37201c2d8fb3c712baa45aaf325ce5@postgresql.org> (raw)
In-Reply-To: <CAHD9QtZ65WgZ9raRz3h+VkBmVPemkS=P_rNWWdz5YRheqX5eWQ@mail.gmail.com>
References: <CAHD9QtZ65WgZ9raRz3h+VkBmVPemkS=P_rNWWdz5YRheqX5eWQ@mail.gmail.com>
On 2024-02-12 20:07, Dávid Suchan 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? 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'm not sure whether it's safe to do it from 9.6 to 15
> at
> once, I have tested the process on 9,6 to 10 yet. Would that be a wise
> approach to such an upgrade of the db?
> 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.
pgupgrade from 9.6 directly to 16 should work fine. That's part of the
test suite for one of my side projects (pgautoupgrade in Docker).
You'll probably want to use the "--link" option too, so it uses the
existing
data files rather than recreating them. It's *much* faster. :)
I'm not sure how the rsync of things will figure into it though. If
you're
just rsyncing files when the database is turned off, it should be
straight
forward.
As always though, make sure you have a backup (that's known to work)
before
you try it all out though. :)
+ Justin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: justin@postgresql.org, david.suchan.ds@gmail.com
Subject: Re: Safest pgupgrade jump distance
In-Reply-To: <1a37201c2d8fb3c712baa45aaf325ce5@postgresql.org>
References: <CAHD9QtZ65WgZ9raRz3h+VkBmVPemkS=P_rNWWdz5YRheqX5eWQ@mail.gmail.com> <1a37201c2d8fb3c712baa45aaf325ce5@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox