From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Reduce log verbosity during prepared transaction recovery
Date: Thu, 29 Oct 2026 14:10:16 +0000
Message-ID: <E1xMQpc-00000001Gac-214V@gemulon.postgresql.org> (raw)
Reduce log verbosity during prepared transaction recovery
Previously, RecoverPreparedTransactions() logged each prepared
transaction at LOG level at the end of recovery. With many unresolved
prepared transactions, these messages could clutter the server log.
Lower the severity of these messages to DEBUG2, matching the messages
in PrepareRedoAdd() and PrepareRedoRemoveFull(), and report the
number of successfully recovered prepared transactions in a single
LOG message. This reduces log clutter while retaining per-transaction
details at DEBUG2.
Author: Ashutosh Sharma <ashu.coek88@gmail.com>
Reviewed-by: Jakub Wartak <jakub.wartak@enterprisedb.com>
Reviewed-by: Pierre Forstmann <pierre.forstmann@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/CAE9k0Pmq1qQEvTKqsBTwUAWrNw+191zcTBPVKmmP5E3X2C+_Xw@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/c11eb5de01ba3401e880195888fb25703e0edf10
Modified Files
--------------
src/backend/access/transam/twophase.c | 16 ++++++++++++----
src/test/recovery/t/009_twophase.pl | 15 +++++++++++++--
2 files changed, 25 insertions(+), 6 deletions(-)
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: fujii@postgresql.org
Subject: Re: pgsql: Reduce log verbosity during prepared transaction recovery
In-Reply-To: <E1xMQpc-00000001Gac-214V@gemulon.postgresql.org>
References: <E1xMQpc-00000001Gac-214V@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