Re: Preserve subscription OIDs during pg_upgrade

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Preserve subscription OIDs during pg_upgrade
Date: 2024-02-26 00:36:57
Message-ID: ZdvdKUUHt21j1eVs@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Feb 25, 2024 at 11:34:35AM -0500, Tom Lane wrote:
> vignesh C <vignesh21(at)gmail(dot)com> writes:
>> Recently we have supported upgrade of subscriptions,but currently
>> subscription OIDs can be changed when a cluster is upgraded using
>> pg_upgrade. It will be better to preserve them as it will be easier to
>> compare subscription related objects in pg_subscription and
>> pg_subscription_rel in the old and new clusters.
>
> I do not think that's a sufficient argument. For other object types,
> we only go through these pushups if we *have to* do so because the
> OIDs may appear in user tables or file names. I don't see a reason
> that subscriptions deserve special treatment.

I think that the idea behind that it that it would then become
possible to relax the restrictions related to the states of the
relations stored in pg_subscription_rel, which can now be only a
"ready" or "init" state (see check_old_cluster_subscription_state)
when we begin the upgrade.

I am not sure that it is a good idea to relax that for PG17 at this
stage of the development cycle, though, as we have already done a lot
in this area for pg_upgrade and it may require more tweaks during the
beta period depending on the feedback received, so I would suggest to
do more improvements for the 18 cycle instead once we have a cleaner
picture of the whole.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2024-02-26 01:08:40 Re: RangeTblEntry jumble omissions
Previous Message Peter Smith 2024-02-26 00:11:02 Re: Add publisher and subscriber to glossary documentation.