Re: Fix race condition in InvalidatePossiblyObsoleteSlot()

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Cc: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, pgsql-hackers@lists.postgresql.org, exclusion@gmail.com
Date: 2024-02-20T05:33:44Z
Lists: pgsql-hackers
On Tue, Feb 20, 2024 at 08:51:17AM +0900, Michael Paquier wrote:
> Prefixing these with "initial_" is fine, IMO.  That shows the
> intention that these come from the slot's data before doing the
> termination.  So I'm OK with what's been proposed in v3.

I was looking at that a second time, and just concluded that this is
OK, so I've applied that down to 16, wordsmithing a bit the comments.

> Both are the same to me, so I have no extra opinion to offer.  ;)

I've kept this one as-is, though.
--
Michael

Commits

  1. Revert "Add recovery TAP test for race condition with slot invalidations"

  2. Add recovery TAP test for race condition with slot invalidations

  3. Fix race leading to incorrect conflict cause in InvalidatePossiblyObsoleteSlot()