diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c index a1ce5d8b8a..905502f145 100644 --- a/src/backend/storage/lmgr/lock.c +++ b/src/backend/storage/lmgr/lock.c @@ -3675,6 +3675,8 @@ VirtualXactLock(VirtualTransactionId vxid, bool wait) * it's no longer running anywhere. */ proc = BackendIdGetProc(vxid.backendId); + if (proc == NULL) + return true; /* * We must acquire this lock before checking the backendId and lxid