Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 72ae29e

Browse files
knizhnikdmpgpro
authored andcommitted
Fix deadlock patch
1 parent 785c611 commit 72ae29e

File tree

1 file changed

+3
-3
lines changed
  • src/backend/storage/lmgr

1 file changed

+3
-3
lines changed

src/backend/storage/lmgr/proc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1669,15 +1669,15 @@ CheckDeadLock(void)
16691669
int i;
16701670

16711671

1672-
if (!pg_atomic_test_set_flag(&ProcGlobal->activeDeadlockCheck))
1673-
return;
1674-
16751672
/*
16761673
* Ensure that only one backend is checking for deadlock.
16771674
* Otherwise under high load cascade of deadlock timeout expirations can cause stuck of Postgres.
16781675
*/
16791676
if (!pg_atomic_test_set_flag(&ProcGlobal->activeDeadlockCheck))
1677+
{
1678+
enable_timeout_after(DEADLOCK_TIMEOUT, DeadlockTimeout);
16801679
return;
1680+
}
16811681
inside_deadlock_check = true;
16821682

16831683
/*

0 commit comments

Comments
 (0)