summaryrefslogtreecommitdiff
path: root/src/include/storage/proc.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-08-27 17:07:42 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-08-27 17:07:42 +0000
commit1785acebf2ed14fd66955e2d9a55d77a025f418d (patch)
tree0c2c3ebe3c71cebd822549fd07fcad38b0985326 /src/include/storage/proc.h
parentef16b4e1574799b6e2aa6549a6eda5e4867675ec (diff)
Introduce local hash table for lock state, as per recent proposal.
PROCLOCK structs in shared memory now have only a bitmask for held locks, rather than counts (making them 40 bytes smaller, which is a good thing). Multiple locks within a transaction are counted in the local hash table instead, and we have provision for tracking which ResourceOwner each count belongs to. Solves recently reported problem with memory leakage within long transactions.
Diffstat (limited to 'src/include/storage/proc.h')
-rw-r--r--src/include/storage/proc.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h
index 4f7f39003ad..9369aee4608 100644
--- a/src/include/storage/proc.h
+++ b/src/include/storage/proc.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/storage/proc.h,v 1.72 2004/08/01 17:32:21 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/storage/proc.h,v 1.73 2004/08/27 17:07:42 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -78,14 +78,14 @@ struct PGPROC
struct PGPROC *lwWaitLink; /* next waiter for same LW lock */
/* Info about lock the process is currently waiting for, if any. */
- /* waitLock and waitHolder are NULL if not currently waiting. */
+ /* waitLock and waitProcLock are NULL if not currently waiting. */
LOCK *waitLock; /* Lock object we're sleeping on ... */
- PROCLOCK *waitHolder; /* Per-holder info for awaited lock */
+ PROCLOCK *waitProcLock; /* Per-holder info for awaited lock */
LOCKMODE waitLockMode; /* type of lock we're waiting for */
LOCKMASK heldLocks; /* bitmask for lock types already held on
* this lock object by this backend */
- SHM_QUEUE procHolders; /* list of PROCLOCK objects for locks held
+ SHM_QUEUE procLocks; /* list of PROCLOCK objects for locks held
* or awaited by this backend */
struct XidCache subxids; /* cache for subtransaction XIDs */