mirror of
https://github.com/postgres/postgres.git
synced 2025-06-14 18:42:34 +03:00
Create new errcode for recovery conflict caused by db drop on master.
Previously reported as ERRCODE_ADMIN_SHUTDOWN, this case is now reported as ERRCODE_T_R_DATABASE_DROPPED. No message text change. Unlikely to happen on most servers, so low impact change to allow session poolers to correctly handle this situation. Tatsuo Ishii, edits by me, review by Robert Haas
This commit is contained in:
@ -2912,9 +2912,11 @@ ProcessInterrupts(void)
|
||||
}
|
||||
else if (RecoveryConflictPending)
|
||||
{
|
||||
/* Currently there is only one non-retryable recovery conflict */
|
||||
Assert(RecoveryConflictReason == PROCSIG_RECOVERY_CONFLICT_DATABASE);
|
||||
pgstat_report_recovery_conflict(RecoveryConflictReason);
|
||||
ereport(FATAL,
|
||||
(errcode(ERRCODE_ADMIN_SHUTDOWN),
|
||||
(errcode(ERRCODE_T_R_DATABASE_DROPPED),
|
||||
errmsg("terminating connection due to conflict with recovery"),
|
||||
errdetail_recovery_conflict()));
|
||||
}
|
||||
|
Reference in New Issue
Block a user