postgresql/src
Heikki Linnakangas 2dfe75f984 Fix self-deadlock when replaying WAL generated by older minor version
Commit 77dff5d937 introduced a SimpleLruWriteAll() call when replaying
multixact WAL records generated by older minor versions. However,
SimpleLruWriteAll() acquires the SLRU lock and on v16 and below, it's
called while already holding the lock, leading to self-deadlock.
Version 17 and 18 did not have that problem, because in those versions
the lock is acquired later in the function.

To fix, acquire MultiXactOffsetSLRULock later in RecordNewMultiXact(),
at the same place where it's acquired on version 17 and 18.

Author: Andrey Borodin <x4mmm@yandex-team.ru>
Reported-by: Radim Marek <radim@boringsql.com>
Discussion: https://www.postgresql.org/message-id/19490-9c59c6a583513b99@postgresql.org
Backpatch-through: 14-16
2026-05-27 11:50:31 +03:00
..
backend Fix self-deadlock when replaying WAL generated by older minor version 2026-05-27 11:50:31 +03:00
bin pg_recvlogical: Honor source cluster file permissions for output files 2026-05-20 15:57:14 +09:00
common Unify src/common/'s definitions of MaxAllocSize. 2026-05-11 05:13:50 -07:00
fe_utils In fmtIdEnc(), handle failure of enlargePQExpBuffer(). 2025-02-16 12:46:35 -05:00
include Prevent path traversal in pg_basebackup and pg_rewind 2026-05-11 05:13:50 -07:00
interfaces Mark PQfn() unsafe and fix overrun in frontend LO interface. 2026-05-11 05:13:51 -07:00
makefiles Refactor DLSUFFIX handling 2022-03-25 08:56:02 +01:00
pl Make plpgsql_trap test more robust and less resource-intensive. 2026-04-21 10:54:39 -04:00
port Prevent path traversal in pg_basebackup and pg_rewind 2026-05-11 05:13:50 -07:00
template On NetBSD, force dynamic symbol resolution at postmaster start. 2022-08-30 17:28:55 -04:00
test Avoid exposing WAL receiver raw conninfo during timeline jumps 2026-05-23 08:10:17 +09:00
timezone Guard against unsafe conditions in usage of pg_strftime(). 2026-05-11 05:13:50 -07:00
tools Add timingsafe_bcmp(), for constant-time memory comparison 2026-05-11 05:13:50 -07: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