postgresql/src
Noah Misch e4b1986b98 WAL-log inplace update before revealing it to other sessions.
A buffer lock won't stop a reader having already checked tuple
visibility.  If a vac_update_datfrozenid() and then a crash happened
during inplace update of a relfrozenxid value, datfrozenxid could
overtake relfrozenxid.  That could lead to "could not access status of
transaction" errors.

Back-patch to v14 - v17.  This is a back-patch of commits:

- 8e7e672cda
  (main change, on master, before v18 branched)
- 8180136652
  (defect fix, on master, before v18 branched)

It reverses commit bc6bad8857, my revert
of the original back-patch.

In v14, this also back-patches the assertion removal from commit
7fcf2faf9c.

Discussion: https://postgr.es/m/20240620012908.92.nmisch@google.com
Backpatch-through: 14-17
2025-12-16 16:13:56 -08:00
..
backend WAL-log inplace update before revealing it to other sessions. 2025-12-16 16:13:56 -08:00
bin Print new OldestXID value in pg_resetwal when it's being changed 2025-11-19 18:06:27 +02:00
common With GB18030, prevent SIGSEGV from reading past end of allocation. 2025-05-05 04:52:08 -07:00
fe_utils In fmtIdEnc(), handle failure of enlargePQExpBuffer(). 2025-02-16 12:46:35 -05:00
include For inplace update, send nontransactional invalidations. 2025-12-16 16:13:56 -08:00
interfaces libpq: Prevent some overflows of int/size_t 2025-11-10 06:03:05 -08:00
makefiles Add NO_INSTALL option to pgxs 2021-05-27 13:58:29 +02:00
pl tests: Rename conflicting role names 2025-12-12 08:46:15 +09:00
port Fix POSIX compliance in pgwin32_unsetenv() for "name" argument 2025-10-21 08:08:42 +09:00
template On NetBSD, force dynamic symbol resolution at postmaster start. 2022-08-30 17:29:03 -04:00
test For inplace update, send nontransactional invalidations. 2025-12-16 16:13:56 -08:00
timezone Update time zone data files to tzdata release 2025b. 2025-04-30 11:14:15 -04:00
tools For inplace update, send nontransactional invalidations. 2025-12-16 16:13:56 -08:00
tutorial Doc: sync src/tutorial/basics.source with SGML documentation. 2022-11-19 13:09:14 -05:00
.gitignore
DEVELOPERS
Makefile Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00
Makefile.global.in Don't put library-supplied -L/-I switches before user-supplied ones. 2025-07-29 15:17:41 -04:00
Makefile.shlib Stop using "-multiply_defined suppress" on macOS. 2023-09-26 21:06:21 -04:00
nls-global.mk Fix update-po for the PGXS case 2025-10-16 20:21:05 +02:00