Commit c59a00f
Fix checkpointer shared memory allocation
Use Min(NBuffers, MAX_CHECKPOINT_REQUESTS) instead of NBuffers in
CheckpointerShmemSize() to match the actual array size limit set in
CheckpointerShmemInit(). This prevents wasting shared memory when
NBuffers > MAX_CHECKPOINT_REQUESTS. Also, fix the comment.
Reported-by: Tom Lane <[email protected]>
Discussion: https://postgr.es/m/1439188.1754506714%40sss.pgh.pa.us
Author: Xuneng Zhou <[email protected]>
Co-authored-by: Alexander Korotkov <[email protected]>
(cherry picked from commit 6058900348059255a8a8da6df46ff8606ca1c612)1 parent 0a5f6f7 commit c59a00f
1 file changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
884 | 884 | | |
885 | 885 | | |
886 | 886 | | |
887 | | - | |
888 | | - | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
889 | 890 | | |
890 | 891 | | |
891 | | - | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
892 | 895 | | |
893 | 896 | | |
894 | 897 | | |
| |||
0 commit comments