diff options
author | Robert Haas <rhaas@postgresql.org> | 2016-01-29 08:10:47 -0500 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2016-01-29 08:14:28 -0500 |
commit | b319356f0e94a6482c726cf4af96597c211d8d6e (patch) | |
tree | dd34e7cf5ac1ec13be0c816b87dbd5e085163ba7 /src/backend/storage/lmgr/proc.c | |
parent | b60376649600268b75e1e8be86a6a6fe7fb9b3c3 (diff) | |
download | postgresql-b319356f0e94a6482c726cf4af96597c211d8d6e.tar.gz postgresql-b319356f0e94a6482c726cf4af96597c211d8d6e.zip |
Migrate PGPROC's backendLock into PGPROC itself, using a new tranche.
Previously, each PGPROC's backendLock was part of the main tranche,
and the PGPROC just contained a pointer. Now, the actual LWLock is
part of the PGPROC.
As with previous, similar patches, this makes it significantly easier
to identify these lwlocks in LWLOCK_STATS or Trace_lwlocks output
and improves modularity.
Author: Ildus Kurbangaliev
Reviewed-by: Amit Kapila, Robert Haas
Diffstat (limited to 'src/backend/storage/lmgr/proc.c')
-rw-r--r-- | src/backend/storage/lmgr/proc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c index 0d5e23ac4d6..3690753d648 100644 --- a/src/backend/storage/lmgr/proc.c +++ b/src/backend/storage/lmgr/proc.c @@ -226,7 +226,7 @@ InitProcGlobal(void) { PGSemaphoreCreate(&(procs[i].sem)); InitSharedLatch(&(procs[i].procLatch)); - procs[i].backendLock = LWLockAssign(); + LWLockInitialize(&(procs[i].backendLock), LWTRANCHE_PROC); } procs[i].pgprocno = i; |