Re: [Patch]The Case For WAL-Logging pg_upgrade

From: John Naylor <johncnaylorls(at)gmail(dot)com>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Bohyun Lee <bohyun(dot)lee(at)databricks(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [Patch]The Case For WAL-Logging pg_upgrade
Date: 2026-08-08 06:11:26
Message-ID: CANWCAZaoR0A6R6R97+00itaaDTuph8H_kiYY401Qa1DqfF94Nw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Aug 6, 2026 at 2:43 PM Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:
>
> On 06/08/2026 01:17, John Naylor wrote:
> > On Wed, Aug 5, 2026 at 9:36 PM Bohyun Lee
> > <bohyun(dot)lee(at)databricks(dot)com> wrote:
> >> The GUCs are introduced because we cannot assume the standby's
> >> storage layout exactly matches the primary's, neither where the
> >> retained pre-upgrade directory sits, nor how its files are
> >> physically placed. It also depends on how the cluster intends to
> >> use the standby. For instance, if the operator wants to keep the
> >> standby as a rollback target, it may be worthwhile to use a
> >> different transfer mode via the newly introduced
> >> pg_upgrade_standby_transfer_mode GUC, which I believe is useful.
> >> Nevertheless, the reconstructed cluster will be logically
> >> identical, even if the physical representation diverges.
> >
> > Given the above design concepts, I still think WAL is fundamentally
> > the wrong mechanism for this.
>
> Can you elaborate? Do you think the changes that pg_upgrade makes should
> be written somewhere else than WAL, or is this just about the transfer
> mode setting, or something else? How would you do it?

The transfer mode setting seems strange and not well motivated to me.
For rollback, can't the operator just pause the rollback target at the
handoff checkpoint while still on the old binary and promote if
necessary? Am I missing something?

--
John Naylor
Amazon Web Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message John Naylor 2026-08-08 06:10:05 Re: [Patch]The Case For WAL-Logging pg_upgrade