public inbox for [email protected]  
help / color / mirror / Atom feed
pgsql: Fix self-deadlock when replaying WAL generated by older minor ve
3+ messages / 1 participants
[nested] [flat]

* pgsql: Fix self-deadlock when replaying WAL generated by older minor ve
@ 2026-05-27 09:06 Heikki Linnakangas <[email protected]>
  0 siblings, 0 replies; 3+ messages in thread

From: Heikki Linnakangas @ 2026-05-27 09:06 UTC (permalink / raw)
  To: [email protected]

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 <[email protected]>
Reported-by: Radim Marek <[email protected]>
Discussion: https://www.postgresql.org/message-id/[email protected]
Backpatch-through: 14-16

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/42a3194e548349b658a808347df3d3d5e6b968af

Modified Files
--------------
src/backend/access/transam/multixact.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Fix self-deadlock when replaying WAL generated by older minor ve
@ 2026-05-27 09:06 Heikki Linnakangas <[email protected]>
  0 siblings, 0 replies; 3+ messages in thread

From: Heikki Linnakangas @ 2026-05-27 09:06 UTC (permalink / raw)
  To: [email protected]

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 <[email protected]>
Reported-by: Radim Marek <[email protected]>
Discussion: https://www.postgresql.org/message-id/[email protected]
Backpatch-through: 14-16

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2dfe75f9844f29f8b2621ed68ee12e577f05e7f3

Modified Files
--------------
src/backend/access/transam/multixact.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Fix self-deadlock when replaying WAL generated by older minor ve
@ 2026-05-27 09:06 Heikki Linnakangas <[email protected]>
  0 siblings, 0 replies; 3+ messages in thread

From: Heikki Linnakangas @ 2026-05-27 09:06 UTC (permalink / raw)
  To: [email protected]

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 <[email protected]>
Reported-by: Radim Marek <[email protected]>
Discussion: https://www.postgresql.org/message-id/[email protected]
Backpatch-through: 14-16

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2bb60eb4feab76ac5ea2ea6f15111b569ea48b62

Modified Files
--------------
src/backend/access/transam/multixact.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2026-05-27 09:06 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-05-27 09:06 pgsql: Fix self-deadlock when replaying WAL generated by older minor ve Heikki Linnakangas <[email protected]>
2026-05-27 09:06 pgsql: Fix self-deadlock when replaying WAL generated by older minor ve Heikki Linnakangas <[email protected]>
2026-05-27 09:06 pgsql: Fix self-deadlock when replaying WAL generated by older minor ve Heikki Linnakangas <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox