postgresql/src
Heikki Linnakangas 8e607a5a4b Fix race condition in committing a serializable transaction
The finished transaction list can contain XIDs that are older than the
serializable global xmin. It's a short-lived state;
ClearOldPredicateLocks() removes any such transactions from the list,
and it's called whenever the global xmin advances. But if another
backend calls SummarizeOldestCommittedSxact() in that window, it will
call SerialAdd() on an XID that's older than the global xmin, or if
there are no more transactions running, when global xmin is
invalid. That trips the assertion in SerialAdd().

Fixes bug #18658 reported by Andrew Bille. Thanks to Alexander Lakhin
for analysis. Backpatch to all versions.

Discussion: https://www.postgresql.org/message-id/18658-7dab125ec688c70b%40postgresql.org
2024-10-21 09:49:41 +03:00
..
backend Fix race condition in committing a serializable transaction 2024-10-21 09:49:41 +03:00
bin vacuumdb: Schema-qualify operator in catalog query's WHERE clause. 2024-10-07 16:49:20 -05: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 Parse libpq's "keepalives" option more like other integer options. 2024-10-02 17:30:36 -04:00
makefiles Remove libpq.rc, use win32ver.rc for libpq 2020-01-15 15:06:12 +01:00
pl Further refine _SPI_execute_plan's rule for atomic execution. 2024-10-16 17:36:30 -04: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 Correctly identify which EC members are computable at a plan node. 2024-10-12 14:56:08 -04:00
timezone Update time zone data files to tzdata release 2024a. 2024-02-01 15:57:53 -05:00
tools Remove incorrect function import from pgindent 2024-10-09 09:34:34 +02: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