Repair performance problem in SI segment manipulations: iterating
Tom Lane <tgl@sss.pgh.pa.us>
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.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/storage/ipc/ipci.c | modified | +2 −2 |
| src/backend/storage/ipc/sinvaladt.c | modified | +35 −53 |
| src/backend/storage/ipc/sinval.c | modified | +7 −6 |
| src/include/storage/sinvaladt.h | modified | +16 −10 |
| src/include/storage/sinval.h | modified | +2 −2 |