summaryrefslogtreecommitdiff
path: root/src/backend/storage/ipc/dsm_registry.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/storage/ipc/dsm_registry.c')
-rw-r--r--src/backend/storage/ipc/dsm_registry.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/backend/storage/ipc/dsm_registry.c b/src/backend/storage/ipc/dsm_registry.c
index ca12815f4a8..97130925106 100644
--- a/src/backend/storage/ipc/dsm_registry.c
+++ b/src/backend/storage/ipc/dsm_registry.c
@@ -299,8 +299,7 @@ GetNamedDSA(const char *name, bool *found)
entry->type = DSMR_ENTRY_TYPE_DSA;
/* Initialize the LWLock tranche for the DSA. */
- state->tranche = LWLockNewTrancheId();
- LWLockRegisterTranche(state->tranche, name);
+ state->tranche = LWLockNewTrancheId(name);
/* Initialize the DSA. */
ret = dsa_create(state->tranche);
@@ -321,9 +320,6 @@ GetNamedDSA(const char *name, bool *found)
ereport(ERROR,
(errmsg("requested DSA already attached to current process")));
- /* Initialize existing LWLock tranche for the DSA. */
- LWLockRegisterTranche(state->tranche, name);
-
/* Attach to existing DSA. */
ret = dsa_attach(state->handle);
dsa_pin_mapping(ret);
@@ -378,8 +374,7 @@ GetNamedDSHash(const char *name, const dshash_parameters *params, bool *found)
entry->type = DSMR_ENTRY_TYPE_DSH;
/* Initialize the LWLock tranche for the hash table. */
- dsh_state->tranche = LWLockNewTrancheId();
- LWLockRegisterTranche(dsh_state->tranche, name);
+ dsh_state->tranche = LWLockNewTrancheId(name);
/* Initialize the DSA for the hash table. */
dsa = dsa_create(dsh_state->tranche);
@@ -409,9 +404,6 @@ GetNamedDSHash(const char *name, const dshash_parameters *params, bool *found)
ereport(ERROR,
(errmsg("requested DSHash already attached to current process")));
- /* Initialize existing LWLock tranche for the hash table. */
- LWLockRegisterTranche(dsh_state->tranche, name);
-
/* Attach to existing DSA for the hash table. */
dsa = dsa_attach(dsh_state->dsa_handle);
dsa_pin_mapping(dsa);