Fix locking assertion.
authorRobert Haas <[email protected]>
Wed, 21 Oct 2015 00:46:32 +0000 (20:46 -0400)
committerRobert Haas <[email protected]>
Wed, 28 Oct 2015 13:43:45 +0000 (14:43 +0100)
src/backend/storage/lmgr/lock.c

index de6a05e0cfe7002e190f7b28c3c9b2dc6f185928..f9543f082682cac7e99d7ae9dd10602b7bf03a10 100644 (file)
 #include <signal.h>
 #include <unistd.h>
 
+#include "access/parallel.h"
 #include "access/transam.h"
 #include "access/twophase.h"
 #include "access/twophase_rmgr.h"
-#include "access/xact.h"
 #include "access/xlog.h"
 #include "miscadmin.h"
 #include "pg_trace.h"
@@ -707,7 +707,7 @@ LockAcquireExtended(const LOCKTAG *locktag,
        lockMethodTable = LockMethods[lockmethodid];
        if (lockmode <= 0 || lockmode > lockMethodTable->numLockModes)
                elog(ERROR, "unrecognized lock mode: %d", lockmode);
-       Assert(!IsInParallelMode() || MyProc->lockGroupLeader != NULL);
+       Assert(!IsParallelWorker() || MyProc->lockGroupLeader != NULL);
 
        if (RecoveryInProgress() && !InRecovery &&
                (locktag->locktag_type == LOCKTAG_OBJECT ||