Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit122abf3

Browse files
committed
Fix LMGR for MVCC.
Get rid of Extend lock mode.
1 parent86bc1da commit122abf3

File tree

7 files changed

+205
-217
lines changed

7 files changed

+205
-217
lines changed

‎src/backend/access/heap/hio.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Id: hio.c,v 1.18 1999/05/01 15:04:46 vadim Exp $
10+
* $Id: hio.c,v 1.19 1999/05/07 01:22:53 vadim Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -111,14 +111,13 @@ RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple)
111111
Itemitem;
112112

113113
/*
114-
* Actually, we lock _relation_ here, not page, but I believe
115-
* that locking page is faster... Obviously, we could get rid
116-
* of ExtendLock mode at all and use ExclusiveLock mode on
117-
* page 0, as long as we use page-level locking for indices only,
118-
* but we are in 6.5-beta currently...- vadim 05/01/99
114+
* Lock relation for extention. We can use LockPage here as long as
115+
* in all other places we use page-level locking for indices only.
116+
* Alternatevely, we could define pseudo-table as we do for
117+
* transactions with XactLockTable.
119118
*/
120119
if (!relation->rd_myxactonly)
121-
LockPage(relation,0,ExtendLock);
120+
LockPage(relation,0,ExclusiveLock);
122121

123122
/*
124123
* XXX This does an lseek - VERY expensive - but at the moment it is
@@ -166,7 +165,7 @@ RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple)
166165
}
167166

168167
if (!relation->rd_myxactonly)
169-
UnlockPage(relation,0,ExtendLock);
168+
UnlockPage(relation,0,ExclusiveLock);
170169

171170
offnum=PageAddItem((Page)pageHeader, (Item)tuple->t_data,
172171
tuple->t_len,InvalidOffsetNumber,LP_USED);

‎src/backend/storage/lmgr/lmgr.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.22 1999/02/1323:18:24 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.23 1999/05/07 01:23:02 vadim Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -79,9 +79,6 @@ static MASK LockConflicts[] = {
7979
(1 <<RowExclusiveLock) | (1 <<RowShareLock) | (1 <<AccessExclusiveLock) |
8080
(1 <<AccessShareLock),
8181

82-
/* ExtendLock */
83-
(1 <<ExtendLock)
84-
8582
};
8683

8784
staticintLockPrios[]= {
@@ -92,8 +89,7 @@ static intLockPrios[] = {
9289
4,
9390
5,
9491
6,
95-
7,
96-
1
92+
7
9793
};
9894

9995
LOCKMETHODLockTableId= (LOCKMETHOD)NULL;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp