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

Commit81b4849

Browse files
committed
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Is there one LOCKMETHODCTL for every backend? I thought there was only> one of them.>>>> You're right, that line is erroneous; it should read>>>> size += MAX_LOCK_METHODS * MAXALIGN(sizeof(LOCKMETHODCTL));>>>> Not a significant error but it should be changed for clarity ...
1 parent10bfaf5 commit81b4849

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.83 2001/02/22 23:20:06 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.84 2001/02/23 18:28:46 momjian Exp $
1212
*
1313
* NOTES
1414
* Outside modules can create a lock table and acquire/release
@@ -1411,8 +1411,7 @@ LockShmemSize(int maxBackends)
14111411

14121412
size+=MAXALIGN(sizeof(PROC_HDR));/* ProcGlobal */
14131413
size+=MAXALIGN(maxBackends*sizeof(PROC));/* each MyProc */
1414-
size+=MAXALIGN(maxBackends*sizeof(LOCKMETHODCTL));/* each
1415-
* lockMethodTable->ctl */
1414+
size+=MAXALIGN(MAX_LOCK_METHODS*sizeof(LOCKMETHODCTL));/* each lockMethodTable->ctl */
14161415

14171416
/* lockHash table */
14181417
size+=hash_estimate_size(NLOCKENTS(maxBackends),

‎src/include/storage/lock.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: lock.h,v 1.45 2001/02/22 23:02:33 momjian Exp $
10+
* $Id: lock.h,v 1.46 2001/02/23 18:28:46 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -79,7 +79,8 @@ typedef int LOCKMETHOD;
7979

8080
/*
8181
* This is the control structure for a lock table.It
82-
* lives in shared memory:
82+
* lives in shared memory. This information is the same
83+
* for all backends.
8384
*
8485
* lockmethod -- the handle used by the lock table's clients to
8586
*refer to the type of lock table being used.
@@ -107,7 +108,7 @@ typedef struct LOCKMETHODCTL
107108
}LOCKMETHODCTL;
108109

109110
/*
110-
*Non-shared header for a lock table.
111+
*Eack backend has anon-sharedlock table header.
111112
*
112113
* lockHash -- hash table holding per-locked-object lock information
113114
* holderHash -- hash table holding per-lock-holder lock information

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp