public inbox for [email protected]
help / color / mirror / Atom feedFrom: Heikki Linnakangas <[email protected]>
To: [email protected]
Subject: pgsql: Remove useless errdetail_abort()
Date: Tue, 03 Feb 2026 13:09:51 +0000
Message-ID: <[email protected]> (raw)
Remove useless errdetail_abort()
I don't understand how to reach errdetail_abort() with
MyProc->recoveryConflictPending set. If a recovery conflict signal is
received, ProcessRecoveryConflictInterrupt() raises an ERROR or FATAL
error to cancel the query or connection, and abort processing clears
the flag. The error message from ProcessRecoveryConflictInterrupt() is
very clear that the query or connection was terminated because of
recovery conflict.
The only way to reach it AFAICS is with a race condition, if the
startup process sends a recovery conflict signal when the transaction
has just entered aborted state for some other reason. And in that case
the detail would be misleading, as the transaction was already aborted
for some other reason, not because of the recovery conflict.
errdetail_abort() was the only user of the recoveryConflictPending
flag in PGPROC, so we can remove that and all the related code too.
Reviewed-by: Chao Li <[email protected]>
Discussion: https://www.postgresql.org/message-id/[email protected]
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/cd375d5b6d5f7d89375541af444e16dd93d27a03
Modified Files
--------------
src/backend/storage/ipc/procarray.c | 20 +++-----------------
src/backend/storage/ipc/standby.c | 15 +++++++--------
src/backend/storage/lmgr/proc.c | 1 -
src/backend/tcop/postgres.c | 35 ++++++-----------------------------
src/include/storage/proc.h | 7 -------
src/include/storage/procarray.h | 6 ++----
6 files changed, 18 insertions(+), 66 deletions(-)
reply
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: [email protected]
Cc: [email protected], [email protected]
Subject: Re: pgsql: Remove useless errdetail_abort()
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox