From 636c6bdbd8d2e2dafd2d100dc34791cb42fb6cb9 Mon Sep 17 00:00:00 2001 From: Thomas Munro Date: Sun, 11 Feb 2018 02:01:31 +1300 Subject: [PATCH] Register and document LWTRANCHE_PARALLEL_HASH_JOIN. Commit 1804284042e659e7d16904e7bbb0ad546394b6a3 defined a new built-in LWLock tranche, but failed to register a name to show in pg_stat_activity.wait_event. Before this commit, waits on that LWLock were incorrectly reported as "extension". Thomas Munro --- doc/src/sgml/monitoring.sgml | 7 ++++++- src/backend/storage/lmgr/lwlock.c | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index e138d1ef076..9adf91a73ad 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -845,7 +845,7 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser - LWLock + LWLock ShmemIndexLock Waiting to find or allocate space in shared memory. @@ -1121,6 +1121,11 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser Waiting to choose the next subplan during Parallel Append plan execution. + + parallel_hash_join + Waiting to acquire a new chunk of memory during Parallel Hash + plan execution. + Lock relation diff --git a/src/backend/storage/lmgr/lwlock.c b/src/backend/storage/lmgr/lwlock.c index 71caac1a1f4..a3476349958 100644 --- a/src/backend/storage/lmgr/lwlock.c +++ b/src/backend/storage/lmgr/lwlock.c @@ -520,6 +520,7 @@ RegisterLWLockTranches(void) "shared_tuplestore"); LWLockRegisterTranche(LWTRANCHE_TBM, "tbm"); LWLockRegisterTranche(LWTRANCHE_PARALLEL_APPEND, "parallel_append"); + LWLockRegisterTranche(LWTRANCHE_PARALLEL_HASH_JOIN, "parallel_hash_join"); /* Register named tranches. */ for (i = 0; i < NamedLWLockTrancheRequests; i++) -- 2.15.1