postgresql/src
Noah Misch 14c57cb639 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 86dc90056d,
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
2024-09-24 15:25:24 -07:00
..
backend For inplace update durability, make heap_update() callers wait. 2024-09-24 15:25:24 -07:00
bin Fix pg_rewind debug output to print the source timeline history 2024-08-08 10:22:30 +03:00
common Fix overread in JSON parsing errors for incomplete byte sequences 2024-05-09 12:45:51 +09:00
fe_utils Clean up assorted failures under clang's -fsanitize=undefined checks. 2022-03-03 18:13:24 -05:00
include For inplace update durability, make heap_update() callers wait. 2024-09-24 15:25:24 -07:00
interfaces Revert ECPG's use of pnstrdup() 2024-08-08 07:42:46 +02:00
makefiles Remove libpq.rc, use win32ver.rc for libpq 2020-01-15 15:06:12 +01:00
pl Translation updates 2024-08-05 12:23:51 +02:00
port Clean up Windows-specific mutex code in libpq and ecpglib. 2024-02-09 11:11:39 -05:00
template On NetBSD, force dynamic symbol resolution at postmaster start. 2022-08-30 17:29:08 -04:00
test For inplace update durability, make heap_update() callers wait. 2024-09-24 15:25:24 -07:00
timezone Update time zone data files to tzdata release 2024a. 2024-02-01 15:57:53 -05:00
tools Improve Perl script which adds commit links to release notes 2024-09-19 08:45:32 -04:00
tutorial Doc: sync src/tutorial/basics.source with SGML documentation. 2022-11-19 13:09:14 -05:00
.gitignore
DEVELOPERS
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Suppress macOS warnings about duplicate libraries in link commands. 2023-09-29 14:07:30 -04:00
Makefile.shlib Stop using "-multiply_defined suppress" on macOS. 2023-09-26 21:06:21 -04:00
nls-global.mk NLS: Fix backend gettext triggers 2019-09-23 09:04:20 +02:00