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

Commitbbbc211

Browse files
committed
Fix xid table sizing.
1 parentdfefad7 commitbbbc211

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

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

Lines changed: 2 additions & 2 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/lock.c,v 1.54 1999/05/25 22:42:03 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.55 1999/05/29 06:14:42 vadim Exp $
1111
*
1212
* NOTES
1313
* Outside modules can create a lock table and acquire/release
@@ -1532,7 +1532,7 @@ LockShmemSize(int maxBackends)
15321532
SHMEM_LOCKTAB_DATASIZE);
15331533

15341534
/* xidHash table */
1535-
size+=hash_estimate_size(maxBackends,
1535+
size+=hash_estimate_size(NLOCKENTS(maxBackends),
15361536
SHMEM_XIDTAB_KEYSIZE,
15371537
SHMEM_XIDTAB_DATASIZE);
15381538

‎src/include/storage/lock.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: lock.h,v 1.28 1999/05/25 22:43:26 momjian Exp $
9+
* $Id: lock.h,v 1.29 1999/05/29 06:14:42 vadim Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -31,10 +31,11 @@ typedef int MASK;
3131
* See LockShmemSize() in lock.c.
3232
*
3333
* NLOCKS_PER_XACT - The number of unique locks acquired in a transaction
34+
* (should be configurable!)
3435
* NLOCKENTS - The maximum number of lock entries in the lock table.
3536
* ----------------------
3637
*/
37-
#defineNLOCKS_PER_XACT40
38+
#defineNLOCKS_PER_XACT64
3839
#defineNLOCKENTS(maxBackends)(NLOCKS_PER_XACT*(maxBackends))
3940

4041
typedefintLOCKMODE;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp