sinvalshmemsize-comment-rmh.patch
application/octet-stream
Filename: sinvalshmemsize-comment-rmh.patch
Type: application/octet-stream
Part: 0
Patch
Format: unified
| File | + | − |
|---|---|---|
| src/backend/storage/ipc/sinvaladt.c | 8 | 0 |
diff --git a/src/backend/storage/ipc/sinvaladt.c b/src/backend/storage/ipc/sinvaladt.c index 68e7160b30..2dec668bbc 100644 --- a/src/backend/storage/ipc/sinvaladt.c +++ b/src/backend/storage/ipc/sinvaladt.c @@ -205,6 +205,14 @@ SInvalShmemSize(void) Size size; size = offsetof(SISeg, procState); + + /* + * In Hot Standby mode, the startup process requests a procState array + * slot using InitRecoveryTransactionEnvironment(). Even though MaxBackends + * doesn't account for the startup process, it is guaranteed to get a + * free slot. This is because the autovacuum launcher and worker processes, + * which are included in MaxBackends, are not started in Hot Standby mode. + */ size = add_size(size, mul_size(sizeof(ProcState), GetMaxBackends())); return size;