From: | Noah Misch <noah(at)leadboat(dot)com> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: AccessExclusiveLock new relations just after assigning the OID. |
Date: | 2024-06-28 02:26:55 |
Message-ID: | E1sN1KA-003J18-FJ@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
------
REL_12_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/7af775bbae5724272f3b72766df977f07fa5455a
Modified Files
--------------
src/backend/catalog/heap.c | 7 +++++++
1 file changed, 7 insertions(+)
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2024-06-28 03:33:11 | pgsql: Improve locking around InjectionPointRun() |
Previous Message | Noah Misch | 2024-06-28 02:26:54 | pgsql: Add an injection_points isolation test suite. |