pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Noah Misch <noah@leadboat.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: AccessExclusiveLock new relations just after assigning the OID.
Date: Fri, 28 Jun 2024 02:26:55 +0000
Message-ID: <E1sN1KA-003J0D-4x@gemulon.postgresql.org> (raw)

AccessExclusiveLock new relations just after assigning the OID.

This has no user-visible, important consequences, since other sessions'
catalog scans can't find the relation until we commit.  However, this
unblocks introducing a rule about locks required to heap_update() a
pg_class row.  CREATE TABLE has been acquiring this lock eventually, but
it can heap_update() pg_class.relchecks earlier.  create_toast_table()
has been acquiring only ShareLock.  Back-patch to v12 (all supported
versions), the plan for the commit relying on the new rule.

Reviewed (in an earlier version) by Robert Haas.

Discussion: https://postgr.es/m/20240611024525.9f.nmisch@google.com

Branch
------
REL_14_STABLE

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

Modified Files
--------------
src/backend/catalog/heap.c | 7 +++++++
1 file changed, 7 insertions(+)



view thread (6+ messages)  latest in thread

Message-ID: <E1sN1KA-003J0D-4x@gemulon.postgresql.org>
Permalink:  ../E1sN1KA-003J0D-4x@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1sN1KA-003J0D-4x@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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: noah@leadboat.com, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: AccessExclusiveLock new relations just after assigning the OID.
  In-Reply-To: <E1sN1KA-003J0D-4x@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