1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-22 23:02:54 +03:00

Fix xid table sizing.

This commit is contained in:
Vadim B. Mikheev 1999-05-29 06:14:43 +00:00
parent dfefad7db0
commit bbbc211ed1
2 changed files with 5 additions and 4 deletions

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.54 1999/05/25 22:42:03 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.55 1999/05/29 06:14:42 vadim Exp $
* *
* NOTES * NOTES
* Outside modules can create a lock table and acquire/release * Outside modules can create a lock table and acquire/release
@ -1532,7 +1532,7 @@ LockShmemSize(int maxBackends)
SHMEM_LOCKTAB_DATASIZE); SHMEM_LOCKTAB_DATASIZE);
/* xidHash table */ /* xidHash table */
size += hash_estimate_size(maxBackends, size += hash_estimate_size(NLOCKENTS(maxBackends),
SHMEM_XIDTAB_KEYSIZE, SHMEM_XIDTAB_KEYSIZE,
SHMEM_XIDTAB_DATASIZE); SHMEM_XIDTAB_DATASIZE);

View File

@ -6,7 +6,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: lock.h,v 1.28 1999/05/25 22:43:26 momjian Exp $ * $Id: lock.h,v 1.29 1999/05/29 06:14:42 vadim Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -31,10 +31,11 @@ typedef int MASK;
* See LockShmemSize() in lock.c. * See LockShmemSize() in lock.c.
* *
* NLOCKS_PER_XACT - The number of unique locks acquired in a transaction * NLOCKS_PER_XACT - The number of unique locks acquired in a transaction
* (should be configurable!)
* NLOCKENTS - The maximum number of lock entries in the lock table. * NLOCKENTS - The maximum number of lock entries in the lock table.
* ---------------------- * ----------------------
*/ */
#define NLOCKS_PER_XACT 40 #define NLOCKS_PER_XACT 64
#define NLOCKENTS(maxBackends) (NLOCKS_PER_XACT*(maxBackends)) #define NLOCKENTS(maxBackends) (NLOCKS_PER_XACT*(maxBackends))
typedef int LOCKMODE; typedef int LOCKMODE;