From: Robert Haas Date: Wed, 21 Oct 2015 00:46:32 +0000 (-0400) Subject: Fix locking assertion. X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=3f16a5e7fc16b7ab6fdb287db83e87f1cf4f2be6;p=users%2Frhaas%2Fpostgres.git Fix locking assertion. --- diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c index de6a05e0cf..f9543f0826 100644 --- a/src/backend/storage/lmgr/lock.c +++ b/src/backend/storage/lmgr/lock.c @@ -32,10 +32,10 @@ #include #include +#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 ||