forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6f4cfe4
committed
Improve GIN index build's tracking of memory usage by using
GetMemoryChunkSpace, not just the palloc request size. This brings theallocatedMemory counter close enough to reality (as measured byMemoryContextStats printouts) that I think we can get rid of the arbitraryfactor-of-2 adjustment that was put into the code initially. Given thesensitivity of GIN build to work memory size, not using as much of workmemory as we're allowed to seems a pretty bad idea.1 parent16dcd5e commit6f4cfe4
2 files changed
+17
-17
lines changedLines changed: 10 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
| 19 | + | |
19 | 20 |
| |
20 | 21 |
| |
21 | 22 |
| |
| |||
38 | 39 |
| |
39 | 40 |
| |
40 | 41 |
| |
41 |
| - | |
| 42 | + | |
42 | 43 |
| |
43 | 44 |
| |
44 | 45 |
| |
| |||
55 | 56 |
| |
56 | 57 |
| |
57 | 58 |
| |
58 |
| - | |
| 59 | + | |
59 | 60 |
| |
60 | 61 |
| |
61 | 62 |
| |
| 63 | + | |
62 | 64 |
| |
63 | 65 |
| |
64 | 66 |
| |
| |||
95 | 97 |
| |
96 | 98 |
| |
97 | 99 |
| |
| 100 | + | |
| 101 | + | |
98 | 102 |
| |
99 | 103 |
| |
100 |
| - | |
101 |
| - | |
102 | 104 |
| |
103 | 105 |
| |
104 | 106 |
| |
| |||
143 | 145 |
| |
144 | 146 |
| |
145 | 147 |
| |
| 148 | + | |
146 | 149 |
| |
147 |
| - | |
148 | 150 |
| |
149 | 151 |
| |
150 | 152 |
| |
| |||
270 | 272 |
| |
271 | 273 |
| |
272 | 274 |
| |
273 |
| - | |
274 | 275 |
| |
275 | 276 |
| |
276 | 277 |
| |
277 | 278 |
| |
| 279 | + | |
278 | 280 |
| |
279 | 281 |
| |
280 | 282 |
| |
| |||
295 | 297 |
| |
296 | 298 |
| |
297 | 299 |
| |
| 300 | + | |
298 | 301 |
| |
299 | 302 |
| |
300 | 303 |
| |
|
Lines changed: 7 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
| 16 | + | |
16 | 17 |
| |
17 | 18 |
| |
18 | 19 |
| |
19 | 20 |
| |
20 | 21 |
| |
21 | 22 |
| |
| 23 | + | |
22 | 24 |
| |
23 | 25 |
| |
24 | 26 |
| |
| |||
132 | 134 |
| |
133 | 135 |
| |
134 | 136 |
| |
135 |
| - | |
136 |
| - | |
| 137 | + | |
137 | 138 |
| |
138 | 139 |
| |
139 | 140 |
| |
| |||
198 | 199 |
| |
199 | 200 |
| |
200 | 201 |
| |
201 |
| - | |
| 202 | + | |
202 | 203 |
| |
203 | 204 |
| |
204 | 205 |
| |
| |||
226 | 227 |
| |
227 | 228 |
| |
228 | 229 |
| |
229 |
| - | |
230 | 230 |
| |
231 | 231 |
| |
232 | 232 |
| |
| |||
237 | 237 |
| |
238 | 238 |
| |
239 | 239 |
| |
240 |
| - | |
241 |
| - | |
242 |
| - | |
243 |
| - | |
244 |
| - | |
| 240 | + | |
| 241 | + | |
245 | 242 |
| |
246 | 243 |
| |
247 | 244 |
| |
|
0 commit comments
Comments
(0)