From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | pgsql-hackers(at)postgresql(dot)org, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
Subject: | Re: Incorrect snapshots while promoting hot standby node when 2PC is used |
Date: | 2021-05-31 12:37:17 |
Message-ID: | YLTYfUE7VEZvtqeD@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, May 27, 2021 at 10:01:49AM -0700, Andres Freund wrote:
> Why would it be intrusive? We're talking a split second here, no? More
> importantly, I don't think it's correct to release the locks at that
> point.
I have been looking at all that for the last couple of days, and
checked the code to make sure that relying on RecoveryInProgress() as
the tipping point is logically correct in terms of virtual XID,
snapshot build and KnownAssignedXids cleanup. This stuff is tricky
enough that I may have missed something, but my impression (and
testing) is that we should be safe.
I am adding this patch to the next CF for now. More eyes are needed.
--
Michael
Attachment | Content-Type | Size |
---|---|---|
end-recovery-2pc.patch | text/x-diff | 1.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Pyhalov | 2021-05-31 12:39:41 | join pushdown and issue with foreign update |
Previous Message | Ashutosh Bapat | 2021-05-31 12:08:11 | Re: postgres_fdw: Handle boolean comparison predicates |