Re: pg_upgrade_replica: avoid full re-clone of standbys after pg_upgrade

From: Florin Irion <irionr(at)gmail(dot)com>
To: Marco Nenciarini <marco(dot)nenciarini(at)enterprisedb(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, "johncnaylorls(at)gmail(dot)com" <johncnaylorls(at)gmail(dot)com>, "hlinnaka(at)iki(dot)fi" <hlinnaka(at)iki(dot)fi>, "bohyun(dot)lee(at)databricks(dot)com" <bohyun(dot)lee(at)databricks(dot)com>
Subject: Re: pg_upgrade_replica: avoid full re-clone of standbys after pg_upgrade
Date: 2026-09-07 15:55:29
Message-ID: CA+HEvJB-TgMcFw5D2OnBofmUgqJdfROTYPLCE4N_hZMVyZmx0g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

I have reviewed the pg_upgrade_replica implementation, and I couldn't spot
any issue.

The tool addresses a real operational problem: standby downtime during
pg_upgrade
can take many hours. This solution provides a practical way to rebuild
standbys without a full re-clone.

The design leverages existing, well-tested components. It uses pg_basebackup
--incremental and pg_combinebackup which already exist and work reliably.
This reduces the amount of new code that needs maintenance and testing.

The manifest format is simple and line-based. Each component has its own
small parser, which keeps things simple and reduces coupling between tools.

The validation strategy is comprehensive. The tool checks that the old standby
was caught-up to the exact checkpoint before proceeding. This validation
happens early, so problems are detected and reported quickly rather than
appearing later.

The operation is explicit and clear. The operator runs the tool on
each standby,
so it is obvious what is happening. If something fails, running it again is
straightforward.

+1

Florin

--
* Florin Irion *
* https://www.enterprisedb.com <https://www.enterprisedb.com/>*

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2026-09-07 15:57:34 Re: Offline data checksum changes can cause incorrect checksum state on standbys
Previous Message vignesh C 2026-09-07 15:42:42 Re: Logical replication row filter loses unchanged toasted columns