diff options
| author | Noah Misch | 2024-06-28 02:21:06 +0000 |
|---|---|---|
| committer | Noah Misch | 2024-06-28 02:21:13 +0000 |
| commit | 11f3815d6af840dc9d557cc680ec477931a6825b (patch) | |
| tree | 3007444b0231211ed637ee0fdc4d516b75a62d73 /src/include | |
| parent | 7af775bbae5724272f3b72766df977f07fa5455a (diff) | |
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/20240114201411.d0@rfd.leadboat.com
Discussion: https://postgr.es/m/20240512232923.aa.nmisch@google.com
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/catalog/catalog.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/catalog/catalog.h b/src/include/catalog/catalog.h index 0e8542d8222..a37ec6f5d7c 100644 --- a/src/include/catalog/catalog.h +++ b/src/include/catalog/catalog.h @@ -21,11 +21,13 @@ extern bool IsSystemRelation(Relation relation); extern bool IsToastRelation(Relation relation); extern bool IsCatalogRelation(Relation relation); +extern bool IsInplaceUpdateRelation(Relation relation); extern bool IsSystemClass(Oid relid, Form_pg_class reltuple); extern bool IsToastClass(Form_pg_class reltuple); extern bool IsCatalogRelationOid(Oid relid); +extern bool IsInplaceUpdateOid(Oid relid); extern bool IsCatalogNamespace(Oid namespaceId); extern bool IsToastNamespace(Oid namespaceId); |
