Content-Length: 270039 | pFad | http://github.com/postgrespro/postgres/commit/edea649afbcedd431802a5255cd153538e43ee1d

5E Explain why the startup process can't cause a shortage of sinval slots. · postgrespro/postgres@edea649 · GitHub
Skip to content

Commit edea649

Browse files
committed
Explain why the startup process can't cause a shortage of sinval slots.
Bharath Rupireddy, reviewed by Fujii Masao and Yura Sokolov. Lightly edited by me. Discussion: http://postgr.es/m/CALj2ACU=3_frMkDp9UUeuZoAMjaK1y0Z_q5RFNbGvwi8NM==AA@mail.gmail.com
1 parent 3785d8e commit edea649

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/backend/storage/ipc/sinvaladt.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,14 @@ SInvalShmemSize(void)
205205
Size size;
206206

207207
size = offsetof(SISeg, procState);
208+
209+
/*
210+
* In Hot Standby mode, the startup process requests a procState array
211+
* slot using InitRecoveryTransactionEnvironment(). Even though MaxBackends
212+
* doesn't account for the startup process, it is guaranteed to get a
213+
* free slot. This is because the autovacuum launcher and worker processes,
214+
* which are included in MaxBackends, are not started in Hot Standby mode.
215+
*/
208216
size = add_size(size, mul_size(sizeof(ProcState), GetMaxBackends()));
209217

210218
return size;

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/edea649afbcedd431802a5255cd153538e43ee1d

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy