1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-27 00:12:01 +03:00

Repair performance problem in SI segment manipulations: iterating

through MAXBACKENDS array entries used to be fine when MAXBACKENDS = 64.
It's not so cool with MAXBACKENDS = 1024 (or more!), especially not in a
frequently-used routine like SIDelExpiredDataEntries.  Repair by making
procState array size be the soft MaxBackends limit rather than the hard
limit, and by converting SIGetProcStateLimit() to a macro.
This commit is contained in:
Tom Lane
1999-05-28 17:03:31 +00:00
parent 33c6d6099d
commit dc6d404959
5 changed files with 62 additions and 73 deletions

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: sinval.h,v 1.10 1999/02/13 23:22:10 momjian Exp $
* $Id: sinval.h,v 1.11 1999/05/28 17:03:31 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -18,7 +18,7 @@
extern SPINLOCK SInvalLock;
extern void CreateSharedInvalidationState(IPCKey key);
extern void CreateSharedInvalidationState(IPCKey key, int maxBackends);
extern void AttachSharedInvalidationState(IPCKey key);
extern void InitSharedInvalidationState(void);
extern void RegisterSharedInvalid(int cacheId, Index hashIndex,