From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Back-patch b1ffe3ff into REL_13_STABLE.
Date: Wed, 08 Jan 2025 21:17:55 +0000
Message-ID: <E1tVdR5-000YML-8V@gemulon.postgresql.org> (raw)
Back-patch b1ffe3ff into REL_13_STABLE.
This is a cherry pick of 4c8e00ae from the 14 branch into the 13 branch.
It avoids an assertion failure when ForwardSyncRequest() tries to
allocate memory while trying to compact the queue, if run in a critical
section. RelationTruncate() gained a critical section in 38c579b0, and
could fail in that way in the 13 branch.
b1ffe3ff originally fixed the same problem with TruncateMultiXact(), but
for that case it only needed to go back as far as 14, where SLRUs
started using the sync request queue. It also fixed a related deadlock
risk that doesn't apply in this case (this case doesn't wait), but it
might exist in theory and it doesn't hurt to keep the code the same as
later branches.
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi> (original commit)
Reviewed-by: Michael Paquier <michael@paquier.xyz> (in this new context)
Reported-by: Yura Sokolov <y.sokolov@postgrespro.ru>
Discussion: https://postgr.es/m/f98aaa79-80b5-47c9-832a-31416a3a528b%40postgrespro.ru
Branch
------
REL_13_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/a722252ef1e1980fb697fe5cff7506245aec5f07
Modified Files
--------------
src/backend/access/transam/xlog.c | 7 +++++++
src/backend/postmaster/checkpointer.c | 4 ++++
2 files changed, 11 insertions(+)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: tmunro@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Back-patch b1ffe3ff into REL_13_STABLE.
In-Reply-To: <E1tVdR5-000YML-8V@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox