From 3f16a5e7fc16b7ab6fdb287db83e87f1cf4f2be6 Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Tue, 20 Oct 2015 20:46:32 -0400 Subject: [PATCH] Fix locking assertion. --- src/backend/storage/lmgr/lock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 || -- 2.39.5