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(-)
