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: Reinstate HEAP_XMAX_LOCK_ONLY|HEAP_KEYS_UPDATED as allowed
Date: Tue, 23 Feb 2021 20:39:34 +0000
Message-ID: <E1lEeT0-0004yd-GJ@gemulon.postgresql.org> (raw)

Reinstate HEAP_XMAX_LOCK_ONLY|HEAP_KEYS_UPDATED as allowed

Commit 866e24d47db1 added an assert that HEAP_XMAX_LOCK_ONLY and
HEAP_KEYS_UPDATED cannot appear together, on the faulty assumption that
the latter necessarily referred to an update and not a tuple lock; but
that's wrong, because SELECT FOR UPDATE can use precisely that
combination, as evidenced by the amcheck test case added here.

Remove the Assert(), and also patch amcheck's verify_heapam.c to not
complain if the combination is found.  Also, out of overabundance of
caution, update (across all branches) README.tuplock to be more explicit
about this.

Author: Julien Rouhaud <rjuju123@gmail.com>
Reviewed-by: Mahendra Singh Thalor <mahi6run@gmail.com>
Reviewed-by: Dilip Kumar <dilipbalaut@gmail.com>
Discussion: https://postgr.es/m/20210124061758.GA11756@nol

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2796ae2ad25330e80e97e823aa72091a9374d87d

Modified Files
--------------
src/backend/access/heap/README.tuplock | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)



view thread (6+ messages)  latest in thread

Message-ID: <E1lEeT0-0004yd-GJ@gemulon.postgresql.org>
Permalink:  ../E1lEeT0-0004yd-GJ@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lEeT0-0004yd-GJ@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: Reinstate HEAP_XMAX_LOCK_ONLY|HEAP_KEYS_UPDATED as allowed
  In-Reply-To: <E1lEeT0-0004yd-GJ@gemulon.postgresql.org>
  References: <E1lEeT0-0004yd-GJ@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