Re: The documentation for READ COMMITTED may be incomplete or wrong

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Aleksander Alekseev <aleksander(at)timescale(dot)com>, Amit Langote <amitlangote09(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: The documentation for READ COMMITTED may be incomplete or wrong
Date: 2023-05-18 19:51:23
Message-ID: 20230518195123.GA3362715@nathanxps13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 18, 2023 at 11:22:54AM -0400, Tom Lane wrote:
> Ugh. Bisecting says it broke at
>
> 86dc90056dfdbd9d1b891718d2e5614e3e432f35 is the first bad commit
> commit 86dc90056dfdbd9d1b891718d2e5614e3e432f35
> Author: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> Date: Wed Mar 31 11:52:34 2021 -0400
>
> Rework planning and execution of UPDATE and DELETE.
>
> which was absolutely not supposed to be breaking any concurrent-execution
> guarantees. I wonder what we got wrong.

With the reproduction steps listed upthread, I see that XMAX for both
tuples is set to the deleting transaction, but the one in inh_child_2 has
two additional infomask flags: HEAP_XMAX_EXCL_LOCK and HEAP_XMAX_LOCK_ONLY.
If I add a third table (i.e., inh_child_3), XMAX for all three tuples is
set to the deleting transaction, and only the one in inh_child_3 has the
lock bits set. Also, in the three-table case, the DELETE statement reports
"DELETE 2".

--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2023-05-18 20:03:36 Re: The documentation for READ COMMITTED may be incomplete or wrong
Previous Message Tomas Vondra 2023-05-18 18:45:48 Re: Missing update of all_hasnulls in BRIN opclasses