git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: a07e03f) | patch
For inplace update durability, make heap_update() callers wait.
2024年9月24日 22:25:18 +0000 (15:25 -0700)
2024年9月24日 22:25:18 +0000 (15:25 -0700)
commit aac2c9b4fde889d13f859c233c2523345e72d32b
For inplace update durability, make heap_update() callers wait.

The previous commit fixed some ways of losing an inplace update. It
remained possible to lose one when a backend working toward a
heap_update() copied a tuple into memory just before inplace update of
that tuple. In catalogs eligible for inplace update, use LOCKTAG_TUPLE
to govern admission to the steps of copying an old tuple, modifying it,
and issuing heap_update(). This includes MERGE commands. To avoid
changing most of the pg_class DDL, don't require LOCKTAG_TUPLE when
holding a relation lock sufficient to exclude inplace updaters.
Back-patch to v12 (all supported versions). In v13 and v12, "UPDATE
pg_class" or "UPDATE pg_database" can still lose an inplace update. The
v14+ UPDATE fix needs commit 86dc90056dfdbd9d1b891718d2e5614e3e432f35,
and it wasn't worth reimplementing that fix without such infrastructure.

Reviewed by Nitin Motiani and (in earlier versions) Heikki Linnakangas.

Discussion: https://postgr.es/m/20231027214946.79.nmisch@google.com
20 files changed:
src/backend/access/heap/README.tuplock diff | blob | blame | history
src/backend/access/heap/heapam.c diff | blob | blame | history
src/backend/access/index/genam.c diff | blob | blame | history
src/backend/catalog/aclchk.c diff | blob | blame | history
src/backend/catalog/catalog.c diff | blob | blame | history
src/backend/commands/dbcommands.c diff | blob | blame | history
src/backend/commands/event_trigger.c diff | blob | blame | history
src/backend/commands/indexcmds.c diff | blob | blame | history
src/backend/commands/tablecmds.c diff | blob | blame | history
src/backend/executor/execMain.c diff | blob | blame | history
src/backend/executor/execReplication.c diff | blob | blame | history
src/backend/executor/nodeModifyTable.c diff | blob | blame | history
src/backend/utils/cache/relcache.c diff | blob | blame | history
src/backend/utils/cache/syscache.c diff | blob | blame | history
src/include/nodes/execnodes.h diff | blob | blame | history
src/include/storage/lockdefs.h diff | blob | blame | history
src/include/utils/syscache.h diff | blob | blame | history
src/test/isolation/expected/intra-grant-inplace.out diff | blob | blame | history
src/test/isolation/specs/eval-plan-qual.spec diff | blob | blame | history
src/test/isolation/specs/intra-grant-inplace.spec diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /