From: | Noah Misch <noah(at)leadboat(dot)com> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Cope with inplace update making catcache stale during TOAST fetc |
Date: | 2024-06-28 02:26:54 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Cope with inplace update making catcache stale during TOAST fetch.
This extends ad98fb14226ae6456fbaed7990ee7591cbe5efd2 to invals of
inplace updates. Trouble requires an inplace update of a catalog having
a TOAST table, so only pg_database was at risk. (The other catalog on
which core code performs inplace updates, pg_class, has no TOAST table.)
Trouble would require something like the inplace-inval.spec test.
Consider GRANT ... ON DATABASE fetching a stale row from cache and
discarding a datfrozenxid update that vac_truncate_clog() has already
relied upon. Back-patch to v12 (all supported versions).
Reviewed (in an earlier version) by Robert Haas.
Discussion: https://postgr.es/m/[email protected]
Discussion: https://postgr.es/m/[email protected]
Branch
------
REL_15_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/b08a4b6163ebb10d0fcfabbccd49eeb23cef70d3
Modified Files
--------------
src/backend/catalog/catalog.c | 21 ++++++++++++++++++
src/backend/utils/cache/catcache.c | 44 +++++++++++++++++++++++++++++++++++---
src/include/catalog/catalog.h | 2 ++
3 files changed, 64 insertions(+), 3 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Noah Misch | 2024-06-28 02:26:55 | pgsql: AccessExclusiveLock new relations just after assigning the OID. |
Previous Message | Amit Langote | 2024-06-28 00:46:29 | pgsql: SQL/JSON: Document behavior when input document is not jsonb |