]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Cope with inplace update making catcache stale during TOAST fetch.
authorNoah Misch <noah@leadboat.com>
Fri, 28 Jun 2024 02:21:06 +0000 (19:21 -0700)
committerNoah Misch <noah@leadboat.com>
Fri, 28 Jun 2024 02:21:12 +0000 (19:21 -0700)
commitaf73e37fa181283a3199cda2233d89c7a669f772
treebac38bf7f6f02069a61b5b599ebfb0c1bf8b3ae7
parente038b7756df8a7487366d4e678c1e0d0d1ba5bbe
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
src/backend/catalog/catalog.c
src/backend/utils/cache/catcache.c
src/include/catalog/catalog.h