We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 785c611 commit 72ae29eCopy full SHA for 72ae29e
src/backend/storage/lmgr/proc.c
@@ -1669,15 +1669,15 @@ CheckDeadLock(void)
1669
int i;
1670
1671
1672
- if (!pg_atomic_test_set_flag(&ProcGlobal->activeDeadlockCheck))
1673
- return;
1674
-
1675
/*
1676
* Ensure that only one backend is checking for deadlock.
1677
* Otherwise under high load cascade of deadlock timeout expirations can cause stuck of Postgres.
1678
*/
1679
if (!pg_atomic_test_set_flag(&ProcGlobal->activeDeadlockCheck))
+ {
+ enable_timeout_after(DEADLOCK_TIMEOUT, DeadlockTimeout);
1680
return;
+ }
1681
inside_deadlock_check = true;
1682
1683
0 commit comments