Repair breakage in VirtualXactLock.
authorRobert Haas <rhaas@postgresql.org>
Tue, 11 Oct 2011 11:39:09 +0000 (07:39 -0400)
committerRobert Haas <rhaas@postgresql.org>
Tue, 11 Oct 2011 11:39:09 +0000 (07:39 -0400)
I broke this in commit 84e37126770dd6de903dad88ce150a49b63b5ef9.  Report and
fix by Fujii Masao.

src/backend/storage/lmgr/lock.c

index a1ce5d8b8a236635aade72885b568bc6056e5241..905502f145b24928167b41ee7b5485fc972a5b86 100644 (file)
@@ -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