Re: Orphaned records in pg_replication_origin_status after subscription drop
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>, Amit Kapila <amit.kapila16@gmail.com>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-12-22T23:21:39Z
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 01:22:38PM -0800, Masahiko Sawada wrote: > Thank you for making the patch! The patch looks good to me. Creating the origin at the end of the same transaction that sets the state to SUBREL_STATE_DATASYNC seems sensible here. I'll spend a couple of extra hours playing with all that across all the branches, see if I can wrap it. This includes some more error injection to cross-check the state of all these transactions with the states in the catalogs while we drop the subscription. The test addition is interesting, nice. I didn't notice that it would be possible to use this trick in 004_sync.. Also, I have double-checked the names of the folks who have reported the bug, giving the following list for the commit logs (in case I don't finish this stuff, feel free to use that): Daisuke Higuchi <higudai@amazon.com> Tenglong Gu <brucegu@amazon.com> -- Michael