Commit 0386ccfe authored by Bruce Momjian's avatar Bruce Momjian

Back out change. Too many place to change too close to beta:

* HOLDER/HOLDERTAB rename to PROCLOCKLINK/PROCLOCKLINKTAG (Bruce)

Will return later.
parent 1663f338
TODO list for PostgreSQL
========================
Last updated: Sat Sep 29 17:34:59 EDT 2001
Last updated: Sat Sep 29 20:43:59 EDT 2001
Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
......@@ -336,7 +336,7 @@ SOURCE CODE
* Make sure all block numbers are unsigned to increase maximum table size
* Use BlockNumber rather than int where appropriate
* Merge LockMethodCtl and LockMethodTable into one shared structure (Bruce)
* -HOLDER/HOLDERTAB rename to PROCLOCKLINK/PROCLOCKLINKTAG (Bruce)
* HOLDER/HOLDERTAB rename to PROCLOCKLINK/PROCLOCKLINKTAG (Bruce)
* Add version file format stamp to heap and other table types
* -Make elog(LOG) in WAL its own output type, distinct from DEBUG (Peter E)
* Rename some /contrib modules from pg* to pg_*
......
......@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/deadlock.c,v 1.5 2001/09/29 21:35:14 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/deadlock.c,v 1.6 2001/09/30 00:45:47 momjian Exp $
*
* Interface:
*
......@@ -382,7 +382,7 @@ FindLockCycleRecurse(PROC *checkProc,
{
PROC *proc;
LOCK *lock;
PROCLOCK *holder;
HOLDER *holder;
SHM_QUEUE *lockHolders;
LOCKMETHODTABLE *lockMethodTable;
LOCKMETHODCTL *lockctl;
......@@ -434,8 +434,8 @@ FindLockCycleRecurse(PROC *checkProc,
*/
lockHolders = &(lock->lockHolders);
holder = (PROCLOCK *) SHMQueueNext(lockHolders, lockHolders,
offsetof(PROCLOCK, lockLink));
holder = (HOLDER *) SHMQueueNext(lockHolders, lockHolders,
offsetof(HOLDER, lockLink));
while (holder)
{
......@@ -458,8 +458,8 @@ FindLockCycleRecurse(PROC *checkProc,
}
}
holder = (PROCLOCK *) SHMQueueNext(lockHolders, &holder->lockLink,
offsetof(PROCLOCK, lockLink));
holder = (HOLDER *) SHMQueueNext(lockHolders, &holder->lockLink,
offsetof(HOLDER, lockLink));
}
/*
......
This diff is collapsed.
......@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.110 2001/09/29 21:35:14 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.111 2001/09/30 00:45:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -563,7 +563,7 @@ int
ProcSleep(LOCKMETHODTABLE *lockMethodTable,
LOCKMODE lockmode,
LOCK *lock,
PROCLOCK *holder)
HOLDER *holder)
{
LOCKMETHODCTL *lockctl = lockMethodTable->ctl;
LWLockId masterLock = lockctl->masterLock;
......
......@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: lock.h,v 1.54 2001/09/29 21:35:14 momjian Exp $
* $Id: lock.h,v 1.55 2001/09/30 00:45:48 momjian Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -144,7 +144,7 @@ typedef struct LOCKTAG
* tag -- uniquely identifies the object being locked
* grantMask -- bitmask for all lock types currently granted on this object.
* waitMask -- bitmask for all lock types currently awaited on this object.
* lockHolders -- list of PROCLOCK objects for this lock.
* lockHolders -- list of HOLDER objects for this lock.
* waitProcs -- queue of processes waiting for this lock.
* requested -- count of each lock type currently requested on the lock
* (includes requests already granted!!).
......@@ -160,7 +160,7 @@ typedef struct LOCK
/* data */
int grantMask; /* bitmask for lock types already granted */
int waitMask; /* bitmask for lock types awaited */
SHM_QUEUE lockHolders; /* list of PROCLOCK objects assoc. with lock */
SHM_QUEUE lockHolders; /* list of HOLDER objects assoc. with lock */
PROC_QUEUE waitProcs; /* list of PROC objects waiting on lock */
int requested[MAX_LOCKMODES]; /* counts of requested
* locks */
......@@ -180,8 +180,8 @@ typedef struct LOCK
* on the same lockable object. We need to store some per-holder information
* for each such holder (or would-be holder).
*
* PROCLOCKTAG is the key information needed to look up a PROCLOCK item in the
* holder hashtable. A PROCLOCKTAG value uniquely identifies a lock holder.
* HOLDERTAG is the key information needed to look up a HOLDER item in the
* holder hashtable. A HOLDERTAG value uniquely identifies a lock holder.
*
* There are two possible kinds of holder tags: a transaction (identified
* both by the PROC of the backend running it, and the xact's own ID) and
......@@ -197,35 +197,35 @@ typedef struct LOCK
* Otherwise, holder objects whose counts have gone to zero are recycled
* as soon as convenient.
*
* Each PROCLOCK object is linked into lists for both the associated LOCK object
* and the owning PROC object. Note that the PROCLOCK is entered into these
* Each HOLDER object is linked into lists for both the associated LOCK object
* and the owning PROC object. Note that the HOLDER is entered into these
* lists as soon as it is created, even if no lock has yet been granted.
* A PROC that is waiting for a lock to be granted will also be linked into
* the lock's waitProcs queue.
*/
typedef struct PROCLOCKTAG
typedef struct HOLDERTAG
{
SHMEM_OFFSET lock; /* link to per-lockable-object information */
SHMEM_OFFSET proc; /* link to PROC of owning backend */
TransactionId xid; /* xact ID, or InvalidTransactionId */
} PROCLOCKTAG;
} HOLDERTAG;
typedef struct PROCLOCK
typedef struct HOLDER
{
/* tag */
PROCLOCKTAG tag; /* unique identifier of holder object */
HOLDERTAG tag; /* unique identifier of holder object */
/* data */
int holding[MAX_LOCKMODES]; /* count of locks currently held */
int nHolding; /* total of holding[] array */
SHM_QUEUE lockLink; /* list link for lock's list of holders */
SHM_QUEUE procLink; /* list link for process's list of holders */
} PROCLOCK;
} HOLDER;
#define SHMEM_PROCLOCKTAB_KEYSIZE sizeof(PROCLOCKTAG)
#define SHMEM_PROCLOCKTAB_DATASIZE (sizeof(PROCLOCK) - SHMEM_PROCLOCKTAB_KEYSIZE)
#define SHMEM_HOLDERTAB_KEYSIZE sizeof(HOLDERTAG)
#define SHMEM_HOLDERTAB_DATASIZE (sizeof(HOLDER) - SHMEM_HOLDERTAB_KEYSIZE)
#define PROCLOCK_LOCKMETHOD(holder) \
#define HOLDER_LOCKMETHOD(holder) \
(((LOCK *) MAKE_PTR((holder).tag.lock))->tag.lockmethod)
......@@ -245,9 +245,9 @@ extern bool LockReleaseAll(LOCKMETHOD lockmethod, PROC *proc,
bool allxids, TransactionId xid);
extern int LockCheckConflicts(LOCKMETHODTABLE *lockMethodTable,
LOCKMODE lockmode,
LOCK *lock, PROCLOCK *holder, PROC *proc,
LOCK *lock, HOLDER *holder, PROC *proc,
int *myHolding);
extern void GrantLock(LOCK *lock, PROCLOCK *holder, LOCKMODE lockmode);
extern void GrantLock(LOCK *lock, HOLDER *holder, LOCKMODE lockmode);
extern void RemoveFromWaitQueue(PROC *proc);
extern int LockShmemSize(int maxBackends);
extern bool DeadLockCheck(PROC *proc);
......
......@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: proc.h,v 1.49 2001/09/29 21:35:14 momjian Exp $
* $Id: proc.h,v 1.50 2001/09/30 00:45:48 momjian Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -67,12 +67,12 @@ struct PROC
/* Info about lock the process is currently waiting for, if any. */
/* waitLock and waitHolder are NULL if not currently waiting. */
LOCK *waitLock; /* Lock object we're sleeping on ... */
PROCLOCK *waitHolder; /* Per-holder info for awaited lock */
HOLDER *waitHolder; /* 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 procHolders; /* list of HOLDER objects for locks held
* or awaited by this backend */
};
......@@ -138,7 +138,7 @@ extern void ProcReleaseLocks(bool isCommit);
extern void ProcQueueInit(PROC_QUEUE *queue);
extern int ProcSleep(LOCKMETHODTABLE *lockMethodTable, LOCKMODE lockmode,
LOCK *lock, PROCLOCK *holder);
LOCK *lock, HOLDER *holder);
extern PROC *ProcWakeup(PROC *proc, int errType);
extern void ProcLockWakeup(LOCKMETHODTABLE *lockMethodTable, LOCK *lock);
extern bool LockWaitCancel(void);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment