| From: | Ajin Cherian <itsajin(at)gmail(dot)com> |
|---|---|
| To: | "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com> |
| Cc: | Rui Zhao <zhaorui126(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(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>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com> |
| Subject: | Re: [PATCH] Preserve replication origin OIDs in pg_upgrade |
| Date: | 2026-10-29 05:41:53 |
| Message-ID: | CAFPTHDYDYvSuqNgmjCYq58N+ircVnufSwgg2GqbKrQa0S76ugw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi all,
Adding some more documentation changes based on Claude code review:
0001:
Reworded the commit message so it no longer describes 0002’s behaviour
as already existing. It now also mentions that tablesync origins
(pg_<suboid>_<relid>) depend on the preserved subscription OID.
0002:
Commit message:
The motivation was inconsistent: it said pg_commit_ts is copied during
upgrade, while the patch’s own docs say commit timestamps are not
preserved. It is now framed as a prerequisite for preserving
pg_commit_ts.
Notes that origins not owned by a subscription (e.g. created by
external tools) were previously lost.
Notes that binary_upgrade_replorigin_advance() is removed.
Lists the user-visible changes: origins are now migrated from pre-17
clusters too, so their subscriptions resume from the migrated
remote_lsn once enabled; the new cluster must have no origins; and the
max_active_replication_origins check now counts tracked origins rather
than subscriptions.
Docs:
Origin migration is now described as applying to old clusters 9.5 or
later, rather than “all cluster versions”.
Documented that a subscription from a pre-17 cluster resumes from its
migrated origin position when enabled.
Clarified what “tracked” means in the max_active_replication_origins
prerequisite.
Comments:
Moved the explanation of NULL vs 0/0 remote_lsn from
replorigin_create_with_id() to
binary_upgrade_create_replication_origin(), where the distinction is
made.
Rewrote the header comment of replorigin_create_with_id() to describe
its contract.
Added a header comment for dumpReplicationOrigins().
Added pg_replication_origin.roident to the list of preserved OIDs at
the top of pg_upgrade.c.
Minor wording fixes in info.c and the TAP test.
regards,
Ajin Cherian
Fujitsu Australia
| Attachment | Content-Type | Size |
|---|---|---|
| v21-0001-Preserve-subscription-OIDs-during-pg_upgrade.patch | application/octet-stream | 10.2 KB |
| v21-0002-Preserve-replication-origin-IDs-during-pg_upgrad.patch | application/octet-stream | 44.5 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kirill Reshke | 2026-10-29 05:53:25 | Re: [PG19] pg_upgrade --check passes, then the upgrade fails |
| Previous Message | Ashutosh Sharma | 2026-10-29 05:30:00 | Re: Reduce logging during prepared transaction recovery |