mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-18 04:17:00 +08:00
Fix LMGR for MVCC.
Get rid of Extend lock mode.
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: lmgr.h,v 1.18 1999/02/19 06:06:34 tgl Exp $
|
||||
* $Id: lmgr.h,v 1.19 1999/05/07 01:23:05 vadim Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -25,8 +25,6 @@
|
||||
#define ExclusiveLock 6
|
||||
#define AccessExclusiveLock 7
|
||||
|
||||
#define ExtendLock 8
|
||||
|
||||
extern LOCKMETHOD LockTableId;
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: lock.h,v 1.24 1999/03/06 21:17:43 tgl Exp $
|
||||
* $Id: lock.h,v 1.25 1999/05/07 01:23:07 vadim Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -41,7 +41,7 @@ typedef int LOCKMODE;
|
||||
typedef int LOCKMETHOD;
|
||||
|
||||
/* MAX_LOCKMODES cannot be larger than the bits in MASK */
|
||||
#define MAX_LOCKMODES 9
|
||||
#define MAX_LOCKMODES 8
|
||||
|
||||
/*
|
||||
* MAX_LOCK_METHODS corresponds to the number of spin locks allocated in
|
||||
@ -204,6 +204,7 @@ typedef struct LOCK
|
||||
|
||||
/* data */
|
||||
int mask;
|
||||
int waitMask;
|
||||
PROC_QUEUE waitProcs;
|
||||
int holders[MAX_LOCKMODES];
|
||||
int nHolding;
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: proc.h,v 1.20 1999/02/19 07:10:47 tgl Exp $
|
||||
* $Id: proc.h,v 1.21 1999/05/07 01:23:07 vadim Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -48,8 +48,9 @@ typedef struct proc
|
||||
* were starting our xact: vacuum must not
|
||||
* remove tuples deleted by xid >= xmin ! */
|
||||
|
||||
LOCK *waitLock; /* Lock we're sleeping on */
|
||||
int token; /* info for proc wakeup routines */
|
||||
LOCK *waitLock; /* Lock we're sleeping on ... */
|
||||
int token; /* type of lock we sleeping for */
|
||||
int holdLock; /* while holding these locks */
|
||||
int pid; /* This procs process id */
|
||||
short sLocks[MAX_SPINS]; /* Spin lock stats */
|
||||
SHM_QUEUE lockQueue; /* locks associated with current
|
||||
@ -116,8 +117,8 @@ extern bool ProcRemove(int pid);
|
||||
/* make static in storage/lmgr/proc.c -- jolly */
|
||||
|
||||
extern void ProcQueueInit(PROC_QUEUE *queue);
|
||||
extern int ProcSleep(PROC_QUEUE *queue, SPINLOCK spinlock, int token,
|
||||
int prio, LOCK *lock, TransactionId xid);
|
||||
extern int ProcSleep(PROC_QUEUE *queue, LOCKMETHODCTL *lockctl, int token,
|
||||
LOCK *lock);
|
||||
extern int ProcLockWakeup(PROC_QUEUE *queue, LOCKMETHOD lockmethod,
|
||||
LOCK *lock);
|
||||
extern void ProcAddLock(SHM_QUEUE *elem);
|
||||
|
||||
Reference in New Issue
Block a user