- Notifications
You must be signed in to change notification settings - Fork5.2k
Commit46df948
committed
Improve accounting for PredXactList, RWConflictPool and PGPROC
Various places allocated shared memory by first allocating a small chunkusing ShmemInitStruct(), followed by ShmemAlloc() calls to allocate morememory. Unfortunately, ShmemAlloc() does not update ShmemIndex, so thisaffected pg_shmem_allocations - it only shown the initial chunk.This commit modifies the following allocations, to allocate everythingas a single chunk, and then split it internally.- PredXactList- RWConflictPool- PGPROC structures- Fast-Path Lock ArrayThe fast-path lock array is allocated separately, not as a part of thePGPROC structures allocation.Author: Rahila Syed <rahilasyed90@gmail.com>Reviewed-by: Andres Freund <andres@anarazel.de>Reviewed-by: Nazir Bilal Yavuz <byavuz81@gmail.com>Reviewed-by: Tomas Vondra <tomas@vondra.me>Discussion:https://postgr.es/m/CAH2L28vHzRankszhqz7deXURxKncxfirnuW68zD7+hVAqaS5GQ@mail.gmail.com1 parentf5930f9 commit46df948
2 files changed
+91
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1226 | 1226 | | |
1227 | 1227 | | |
1228 | 1228 | | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
1229 | 1233 | | |
1230 | | - | |
| 1234 | + | |
1231 | 1235 | | |
1232 | 1236 | | |
1233 | 1237 | | |
1234 | 1238 | | |
1235 | 1239 | | |
1236 | 1240 | | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
1237 | 1244 | | |
1238 | 1245 | | |
1239 | 1246 | | |
| |||
1242 | 1249 | | |
1243 | 1250 | | |
1244 | 1251 | | |
1245 | | - | |
1246 | | - | |
1247 | | - | |
| 1252 | + | |
| 1253 | + | |
1248 | 1254 | | |
1249 | | - | |
1250 | 1255 | | |
1251 | 1256 | | |
1252 | 1257 | | |
| |||
1300 | 1305 | | |
1301 | 1306 | | |
1302 | 1307 | | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
1303 | 1312 | | |
1304 | | - | |
| 1313 | + | |
1305 | 1314 | | |
1306 | 1315 | | |
1307 | 1316 | | |
1308 | 1317 | | |
1309 | 1318 | | |
1310 | 1319 | | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
1311 | 1323 | | |
1312 | | - | |
1313 | | - | |
1314 | | - | |
| 1324 | + | |
| 1325 | + | |
1315 | 1326 | | |
1316 | | - | |
1317 | 1327 | | |
1318 | 1328 | | |
1319 | 1329 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | | - | |
97 | | - | |
| 96 | + | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | | - | |
104 | 102 | | |
105 | | - | |
106 | | - | |
107 | 103 | | |
108 | | - | |
109 | | - | |
110 | 104 | | |
111 | 105 | | |
112 | 106 | | |
113 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
114 | 123 | | |
115 | 124 | | |
116 | 125 | | |
| |||
123 | 132 | | |
124 | 133 | | |
125 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
126 | 153 | | |
127 | 154 | | |
128 | 155 | | |
| |||
175 | 202 | | |
176 | 203 | | |
177 | 204 | | |
| 205 | + | |
| 206 | + | |
178 | 207 | | |
179 | 208 | | |
180 | 209 | | |
| |||
204 | 233 | | |
205 | 234 | | |
206 | 235 | | |
207 | | - | |
208 | | - | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
209 | 247 | | |
210 | 248 | | |
211 | 249 | | |
| |||
217 | 255 | | |
218 | 256 | | |
219 | 257 | | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
227 | 269 | | |
228 | 270 | | |
229 | 271 | | |
| |||
233 | 275 | | |
234 | 276 | | |
235 | 277 | | |
236 | | - | |
237 | | - | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
238 | 285 | | |
239 | 286 | | |
240 | | - | |
| 287 | + | |
241 | 288 | | |
242 | 289 | | |
243 | 290 | | |
| |||
330 | 377 | | |
331 | 378 | | |
332 | 379 | | |
333 | | - | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
334 | 383 | | |
335 | 384 | | |
336 | 385 | | |
| |||
0 commit comments
Comments
(0)