RE: [PATCH] Preserve replication origin OIDs in pg_upgrade

From: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
To: 'shveta malik' <shveta(dot)malik(at)gmail(dot)com>, Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>
Cc: Ajin Cherian <itsajin(at)gmail(dot)com>, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: RE: [PATCH] Preserve replication origin OIDs in pg_upgrade
Date: 2026-07-08 06:21:07
Message-ID: OS9PR01MB12149E88B5ABBA9AEC715CBF2F5FF2@OS9PR01MB12149.jpnprd01.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dear Shveta,

> For this reason, my inclination is to revert to the previous
> implementation, where we compare old_cluster.nsubs with
> max_active_replication_origins. But I'd like to hear what others think
> before we make this change.

But if origin created by users (or any extensions) have already been tracking the
Remote_lsn, they should be taken into account. If there are three enabled
subscriptions, two active user-created origins but the max_active_origin is set
to three on the new node, the upgrading should fail.

I prefer to preserve the current behavior of the patch, which compares
max_active_origin and total number of origins. It might cause the false-positive,
but even now it can happen. E.g., if there was a subscription which has never
been enabled.

Best regards,
Hayato Kuroda
FUJITSU LIMITED

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message shveta malik 2026-07-08 06:27:37 Re: [PATCH] Preserve replication origin OIDs in pg_upgrade
Previous Message Bertrand Drouvot 2026-07-08 06:00:22 Re: Add per-backend AIO statistics