summaryrefslogtreecommitdiff
path: root/src/backend/commands/analyze.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/analyze.c')
-rw-r--r--src/backend/commands/analyze.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c
index 32985a4a0a..d6bba6f3e4 100644
--- a/src/backend/commands/analyze.c
+++ b/src/backend/commands/analyze.c
@@ -40,6 +40,7 @@
#include "storage/lmgr.h"
#include "storage/proc.h"
#include "storage/procarray.h"
+#include "storage/procarraylock.h"
#include "utils/acl.h"
#include "utils/attoptcache.h"
#include "utils/datum.h"
@@ -222,9 +223,9 @@ analyze_rel(Oid relid, VacuumStmt *vacstmt, BufferAccessStrategy bstrategy)
/*
* OK, let's do it. First let other backends know I'm in ANALYZE.
*/
- LWLockAcquire(ProcArrayLock, LW_EXCLUSIVE);
+ ProcArrayLockAcquire(PAL_EXCLUSIVE);
MyProc->vacuumFlags |= PROC_IN_ANALYZE;
- LWLockRelease(ProcArrayLock);
+ ProcArrayLockRelease();
/*
* Do the normal non-recursive ANALYZE.
@@ -249,9 +250,9 @@ analyze_rel(Oid relid, VacuumStmt *vacstmt, BufferAccessStrategy bstrategy)
* Reset my PGPROC flag. Note: we need this here, and not in vacuum_rel,
* because the vacuum flag is cleared by the end-of-xact code.
*/
- LWLockAcquire(ProcArrayLock, LW_EXCLUSIVE);
+ ProcArrayLockAcquire(PAL_EXCLUSIVE);
MyProc->vacuumFlags &= ~PROC_IN_ANALYZE;
- LWLockRelease(ProcArrayLock);
+ ProcArrayLockRelease();
}
/*