Commit 28f6e20
committed
Fix shmem allocation size.
MaxBackends is still 0 when _PG_init() is called, which means that we
don't request enough memory in RequestAddinShmemSpace(), while the rest of
the code sees (and allocate) a correct value.
It's technically usually not a problem as postgres adds an extra 100kB of
memory for small unaccounted memory usage, but it's better to avoid relying on
it too much.
Note that the value is still not guaranteed to be exact as other modules
_PG_init() could later change the underlying GUCs, but there is not available
API to handle that case accurately.1 parent 59cfadb commit 28f6e20
1 file changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
20 | 24 | | |
21 | 25 | | |
22 | 26 | | |
| |||
75 | 79 | | |
76 | 80 | | |
77 | 81 | | |
78 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
79 | 88 | | |
80 | 89 | | |
81 | 90 | | |
| |||
0 commit comments