pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Allow special SKIP LOCKED condition in Assert()
Date: Tue, 04 Jan 2022 16:02:23 +0000
Message-ID: <E1n4mGV-0002Vb-NR@gemulon.postgresql.org> (raw)

Allow special SKIP LOCKED condition in Assert()

Under concurrency, it is possible for two sessions to be merrily locking
and releasing a tuple and marking it again as HEAP_XMAX_INVALID all the
while a third session attempts to lock it, miserably fails at it, and
then contemplates life, the universe and everything only to eventually
fail an assertion that said bit is not set.  Before SKIP LOCKED that was
indeed a reasonable expectation, but alas! commit df630b0dd5ea falsified
it.

This bug is as old as time itself, and even older, if you think time
begins with the oldest supported branch.  Therefore, backpatch to all
supported branches.

Author: Simon Riggs <simon.riggs@enterprisedb.com>
Discussion: https://postgr.es/m/CANbhV-FeEwMnN8yuMyss7if1ZKjOKfjcgqB26n8pqu1e=q0ebg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f66885bec0df509ee9b604a83c17dbd7eb9959b1

Modified Files
--------------
src/backend/access/heap/heapam.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)



view thread (6+ messages)  latest in thread

Message-ID: <E1n4mGV-0002Vb-NR@gemulon.postgresql.org>
Permalink:  ../E1n4mGV-0002Vb-NR@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1n4mGV-0002Vb-NR@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: alvherre@alvh.no-ip.org
  Subject: Re: pgsql: Allow special SKIP LOCKED condition in Assert()
  In-Reply-To: <E1n4mGV-0002Vb-NR@gemulon.postgresql.org>
  References: <E1n4mGV-0002Vb-NR@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox