pgsql: Cope with inplace update making catcache stale during TOAST fetc

Поиск
Список
Период
Сортировка
От Noah Misch
Тема pgsql: Cope with inplace update making catcache stale during TOAST fetc
Дата
Msg-id E1sN1KA-003J0Y-9j@gemulon.postgresql.org
обсуждение исходный текст
Список 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/20240114201411.d0@rfd.leadboat.com
Discussion: https://postgr.es/m/20240512232923.aa.nmisch@google.com

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7a21306aee0ac55d931e3da618735a75bda67245

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(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Noah Misch
Дата:
Сообщение: pgsql: Make TAP todo_start effects the same under Meson and prove_check
Следующее
От: Michael Paquier
Дата:
Сообщение: pgsql: Improve locking around InjectionPointRun()