public inbox for [email protected]  
help / color / mirror / Atom feed
From: Ron Johnson <[email protected]>
To: pgsql-general <[email protected]>
Subject: Re: Questions on Upgrading PostgreSQL from 15.0 to 15.9 and Setting Up Streaming Replication
Date: Sun, 24 Nov 2024 11:47:32 -0500
Message-ID: <CANzqJaC34D0nboV+j_sEniyaxsH2-A7fH9QwVSE9WMu=t_y93w@mail.gmail.com> (raw)
In-Reply-To: <CAD=40Z3Rvbx46SxYBBdLvgSObXCP+Firszz++rDTXmGX795D2Q@mail.gmail.com>
References: <CAD=40Z3Rvbx46SxYBBdLvgSObXCP+Firszz++rDTXmGX795D2Q@mail.gmail.com>

On Sun, Nov 24, 2024 at 11:05 AM Subhash Udata <[email protected]>
wrote:

> Dear PostgreSQL Community,
>
> I have a production database setup with a primary server and a standby
> server. The database is currently running on *PostgreSQL 15.0*, and I
> plan to upgrade both servers to *15.9*.
>
> I have the following questions regarding the upgrade and replication
> process:
>
>    1.
>
>    *Upgrade and Replication Compatibility*:
>    - My plan is to perform a failover, promote the standby server
>       (currently 15.0) to primary, and then upgrade the old primary server to
>       version 15.9.
>
>
Try to replicate from old->new version, because bug fixes in newer versions
might have broken something in new->old replication.

If you really can't tolerate any downtime, then shutdown and upgrade the
Secondary server from 15.0 to 15.10.  Once you start it back up,
replication from the still-15.0 primary will catch back up to the
now-patched Secondary.

Fail over to the Secondary (now new-Primary), and then patch old-Primary to
15.10.


>
>    1.
>       - After upgrading the old primary server to version 15.9, I want to
>       configure it as a standby server and set up streaming replication with the
>       new primary server, which will still be running version 15.0.
>       - Is it possible to establish streaming replication between these
>       two versions (*15.0* as primary and *15.9* as standby)?
>    2.
>
>    *Efficient Replication Setup*:
>    - The production database is around *1TB in size*, and creating
>       replication using pg_basebackup is taking more than 2–3 hours to
>       complete.
>       - Is there an alternative method to set up replication without
>       taking a full backup of the entire cluster but instead using only the WAL
>       files that have changed on both servers?
>
>
pg_rewind is probably what you want.  I've never used it, though.

-- 
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!


view thread (9+ messages)  latest in thread

reply

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: Questions on Upgrading PostgreSQL from 15.0 to 15.9 and Setting Up Streaming Replication
  In-Reply-To: <CANzqJaC34D0nboV+j_sEniyaxsH2-A7fH9QwVSE9WMu=t_y93w@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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