From 1fc95ec6ede7b14ab885ce850e1b41ab1851466b Mon Sep 17 00:00:00 2001 From: Hao Wu Date: Thu, 25 Sep 2025 11:58:04 +0000 Subject: [PATCH] Wait a little more time for the writer process When the reader process acquires a LOCK, it requires to get the writer PROC. For first time, the reader may not get the writer PROC. It's unknown why the reader can't find the writer. Wait a little more time for it. --- src/backend/storage/lmgr/lock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c index 016ad29072c..6d950bba317 100644 --- a/src/backend/storage/lmgr/lock.c +++ b/src/backend/storage/lmgr/lock.c @@ -938,7 +938,7 @@ LockAcquireExtended(const LOCKTAG *locktag, /* Find the guy who should manage our locks */ volatile PGPROC * proc = FindProcByGpSessionId(gp_session_id); int count = 0; - while(proc==NULL && count < 5) + while(proc==NULL && count < 200) { pg_usleep( /* microseconds */ 2000); count++;