- Notifications
You must be signed in to change notification settings - Fork39
Commit277a4e5
committed
Fix shmem allocation size.
MaxBackends is still 0 when _PG_init() is called, which means that wedon't request enough memory in RequestAddinShmemSpace(), while the rest ofthe code sees (and allocate) a correct value.It's technically usually not a problem as postgres adds an extra 100kB ofmemory for small unaccounted memory usage, but it's better to avoid relying onit 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 availableAPI to handle that case accurately.1 parent59cfadb commit277a4e5
1 file changed
+36
-6
lines changedLines changed: 36 additions & 6 deletions
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 |
| |
| |||
66 | 70 |
| |
67 | 71 |
| |
68 | 72 |
| |
69 |
| - | |
70 |
| - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
71 | 89 |
| |
72 | 90 |
| |
73 | 91 |
| |
74 | 92 |
| |
75 | 93 |
| |
76 | 94 |
| |
77 |
| - | |
78 |
| - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
79 | 111 |
| |
80 | 112 |
| |
81 |
| - | |
82 |
| - | |
83 | 113 |
| |
84 | 114 |
| |
85 | 115 |
| |
|
0 commit comments
Comments
(0)