pgsql: AccessExclusiveLock new relations just after assigning the OID. - Mailing list pgsql-committers

From Noah Misch
Subject pgsql: AccessExclusiveLock new relations just after assigning the OID.
Date
Msg-id E1sN1K9-003IzD-Pk@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5b823b179e5e8ab32f140658698ca08f8c83f06e

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


pgsql-committers by date:

Previous
From: Amit Langote
Date:
Subject: pgsql: SQL/JSON: Document behavior when input document is not jsonb
Next
From: Noah Misch
Date:
Subject: pgsql: Remove comment about xl_heap_inplace "AT END OF STRUCT".