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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user