From dc6d4049599031a17c94a10a5d0b1d666dfc3817 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 28 May 1999 17:03:31 +0000 Subject: 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. --- src/backend/storage/ipc/ipci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/storage/ipc/ipci.c') diff --git a/src/backend/storage/ipc/ipci.c b/src/backend/storage/ipc/ipci.c index 6fedbcf85af..fd0b53d9a61 100644 --- a/src/backend/storage/ipc/ipci.c +++ b/src/backend/storage/ipc/ipci.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipci.c,v 1.24 1999/05/25 16:11:09 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipci.c,v 1.25 1999/05/28 17:03:29 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -108,7 +108,7 @@ CreateSharedMemoryAndSemaphores(IPCKey key, int maxBackends) */ InitProcGlobal(key, maxBackends); - CreateSharedInvalidationState(key); + CreateSharedInvalidationState(key, maxBackends); } -- cgit v1.2.3