Commit eb11de8
committed
Sanity-check that a page zeroed by redo routine is marked with WILL_INIT.
There was already a sanity-check in the other direction: if a page was
marked with WILL_INIT, it had to be initialized by the redo routine. It's
not strictly necessary for correctness that a page is marked with WILL_INIT
if it's going to be initialized at redo, but it's a missed optimization if
nothing else.
Fix a few instances of this issue in SP-GiST, where a block in WAL record
was not marked with WILL_INIT, but was in fact always initialized at redo.
We were creating a full-page image of the page unnecessarily in those
cases.
Backpatch to 9.5, where the new WILL_INIT flag was added.1 parent e52b690 commit eb11de8
2 files changed
+38
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
| 294 | + | |
294 | 295 | | |
295 | 296 | | |
296 | 297 | | |
297 | 298 | | |
298 | 299 | | |
299 | | - | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
300 | 304 | | |
301 | 305 | | |
302 | 306 | | |
| |||
1348 | 1352 | | |
1349 | 1353 | | |
1350 | 1354 | | |
1351 | | - | |
1352 | | - | |
1353 | | - | |
| 1355 | + | |
1354 | 1356 | | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
1355 | 1361 | | |
| 1362 | + | |
1356 | 1363 | | |
| 1364 | + | |
1357 | 1365 | | |
1358 | 1366 | | |
1359 | 1367 | | |
1360 | 1368 | | |
1361 | 1369 | | |
1362 | 1370 | | |
1363 | 1371 | | |
1364 | | - | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
1365 | 1380 | | |
1366 | 1381 | | |
1367 | 1382 | | |
| |||
1631 | 1646 | | |
1632 | 1647 | | |
1633 | 1648 | | |
| 1649 | + | |
1634 | 1650 | | |
1635 | 1651 | | |
1636 | 1652 | | |
1637 | 1653 | | |
1638 | 1654 | | |
1639 | 1655 | | |
1640 | | - | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
1641 | 1660 | | |
1642 | 1661 | | |
1643 | 1662 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
| 331 | + | |
| 332 | + | |
331 | 333 | | |
332 | 334 | | |
333 | 335 | | |
334 | 336 | | |
335 | 337 | | |
336 | 338 | | |
337 | 339 | | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
338 | 351 | | |
339 | 352 | | |
340 | 353 | | |
| |||
359 | 372 | | |
360 | 373 | | |
361 | 374 | | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | 375 | | |
369 | 376 | | |
370 | 377 | | |
| |||
0 commit comments