Commit 44086b0
committed
Preliminary refactor of heap scanning functions
To allow the use of the read stream API added in b5a9b18 for
sequential scans on heap tables, here we make some adjustments to make
that change less invasive and perhaps make the code easier to follow in
the process.
Here heapgetpage() gets broken into two functions:
1) The part which reads the block has now been moved into a function
named heapfetchbuf().
2) The part which performed pruning and populated the scan's
rs_vistuples[] array is now moved into a new function named
heap_prepare_pagescan().
The functionality provided by heap_prepare_pagescan() was only ever
required by SO_ALLOW_PAGEMODE scans, so the branching that was
previously done in heapgetpage() is no longer needed as we simply just
don't call heap_prepare_pagescan() from heapgettup() in the refactored
code.
Author: Melanie Plageman
Discussion: https://postgr.es/m/CAAKRu_YtXJiYKQvb5JsA2SkwrsizYLugs4sSOZh3EAjKUg=gEQ@mail.gmail.com1 parent 85230a2 commit 44086b0
File tree
3 files changed
+75
-45
lines changed- src
- backend/access/heap
- include/access
3 files changed
+75
-45
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
363 | | - | |
| 363 | + | |
364 | 364 | | |
365 | | - | |
366 | | - | |
367 | | - | |
| 365 | + | |
| 366 | + | |
368 | 367 | | |
369 | 368 | | |
370 | | - | |
| 369 | + | |
371 | 370 | | |
372 | 371 | | |
373 | | - | |
| 372 | + | |
| 373 | + | |
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
| 381 | + | |
404 | 382 | | |
405 | | - | |
| 383 | + | |
| 384 | + | |
406 | 385 | | |
407 | 386 | | |
408 | 387 | | |
| |||
475 | 454 | | |
476 | 455 | | |
477 | 456 | | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
478 | 488 | | |
479 | 489 | | |
480 | 490 | | |
| |||
748 | 758 | | |
749 | 759 | | |
750 | 760 | | |
751 | | - | |
| 761 | + | |
752 | 762 | | |
753 | 763 | | |
754 | 764 | | |
| |||
869 | 879 | | |
870 | 880 | | |
871 | 881 | | |
872 | | - | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
873 | 887 | | |
874 | 888 | | |
875 | 889 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2352 | 2352 | | |
2353 | 2353 | | |
2354 | 2354 | | |
2355 | | - | |
| 2355 | + | |
| 2356 | + | |
2356 | 2357 | | |
2357 | | - | |
2358 | | - | |
| 2358 | + | |
| 2359 | + | |
2359 | 2360 | | |
| 2361 | + | |
| 2362 | + | |
| 2363 | + | |
2360 | 2364 | | |
2361 | 2365 | | |
2362 | 2366 | | |
| |||
2398 | 2402 | | |
2399 | 2403 | | |
2400 | 2404 | | |
| 2405 | + | |
| 2406 | + | |
2401 | 2407 | | |
2402 | 2408 | | |
2403 | | - | |
2404 | | - | |
2405 | | - | |
2406 | | - | |
2407 | 2409 | | |
2408 | | - | |
2409 | 2410 | | |
2410 | 2411 | | |
2411 | 2412 | | |
2412 | | - | |
2413 | | - | |
| 2413 | + | |
| 2414 | + | |
| 2415 | + | |
| 2416 | + | |
| 2417 | + | |
| 2418 | + | |
| 2419 | + | |
| 2420 | + | |
| 2421 | + | |
| 2422 | + | |
| 2423 | + | |
| 2424 | + | |
2414 | 2425 | | |
| 2426 | + | |
| 2427 | + | |
| 2428 | + | |
| 2429 | + | |
| 2430 | + | |
2415 | 2431 | | |
2416 | 2432 | | |
2417 | 2433 | | |
| |||
2572 | 2588 | | |
2573 | 2589 | | |
2574 | 2590 | | |
2575 | | - | |
2576 | | - | |
| 2591 | + | |
| 2592 | + | |
2577 | 2593 | | |
2578 | 2594 | | |
2579 | 2595 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
| 270 | + | |
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
| |||
0 commit comments