Re: Orphaned records in pg_replication_origin_status after subscription drop - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Orphaned records in pg_replication_origin_status after subscription drop
Date
Msg-id aUnSg50Y7tsASWvt@paquier.xyz
Whole thread Raw
In response to Re: Orphaned records in pg_replication_origin_status after subscription drop  (Masahiko Sawada <sawada.mshk@gmail.com>)
Responses Re: Orphaned records in pg_replication_origin_status after subscription drop
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: [PATCH] O_CLOEXEC not honored on Windows - handle inheritance chain
Next
From: Masahiko Sawada
Date:
Subject: Re: [PATCH] Add memory usage reporting to VACUUM VERBOSE