Keep track of the last active slot in the shared ProcState array, so
Tom Lane <tgl@sss.pgh.pa.us>
Keep track of the last active slot in the shared ProcState array, so that search loops only have to scan that far and not through all maxBackends entries. This eliminates a performance penalty for setting maxBackends much higher than the average number of active backends. Also, eliminate no-longer-used 'backend tag' concept. Remove setting of environment variables at backend start (except for CYR_RECODE), since none of them are being examined by the backend any longer.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/dbcommands.c | modified | +2 −2 |
| src/backend/postmaster/postmaster.c | modified | +69 −115 |
| src/backend/storage/ipc/sinvaladt.c | modified | +35 −30 |
| src/backend/storage/ipc/sinval.c | modified | +15 −9 |
| src/backend/utils/init/globals.c | modified | +1 −2 |
| src/backend/utils/init/postinit.c | modified | +22 −62 |
| src/include/miscadmin.h | modified | +1 −2 |
| src/include/storage/backendid.h | modified | +2 −7 |
| src/include/storage/sinvaladt.h | modified | +2 −2 |
| src/include/storage/sinval.h | modified | +2 −2 |