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>
Fri, 1 Jun 2012 12:29:52 +0000 (08:29 -0400)
I broke this in commit 84e37126770dd6de903dad88ce150a49b63b5ef9.  Report and
fix by Fujii Masao.

src/backend/storage/lmgr/lock.c

index 05ea6e2d2536fa05fdca103a665db4b1f31096b7..c8a1edb66f42365177a10cb272458081ad018715 100644 (file)
@@ -3731,6 +3731,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