Re: Orphaned records in pg_replication_origin_status after subscription drop
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-12-22T05:24:18Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Update comments to reflect changes in 8e0d32a4a1.
- 98e8fe57c24f 19 (unreleased) landed
- 214c17bd623e 18.2 landed
- a1cdb8120110 17.8 landed
-
Fix orphaned origin in shared memory after DROP SUBSCRIPTION
- 25a04aa52b52 14.21 landed
- 90d1beef62de 15.16 landed
- e22e9ab0cd45 16.12 landed
- e063ccc722e4 17.8 landed
- b07c326192d0 18.2 landed
- 8e0d32a4a1bf 19 (unreleased) landed
On Mon, Dec 22, 2025 at 4:31 AM Michael Paquier <michael@paquier.xyz> wrote: > > On Sat, Dec 20, 2025 at 02:55:15PM +0530, Amit Kapila wrote: > > As of today, I can't think of a case where next time (restart after > > error) we won't generate the same origin_name but I think this will > > add the dependency that each time the origin name should be generated > > the same. > > ReplicationOriginNameForLogicalRep() would generate the origin name as > pg_suboid_relid, so we would always reuse the same origin name on > restart as long as the subscription is not recreated, wouldn't we? > Yes. I had thought about if there is any way the relid or subid can change in between the restart of tablesync worker but I can't think of any. So, it sounds safe. -- With Regards, Amit Kapila.