Preliminary refactor of heap scanning functions To allow the use of the read stream API added in b5a9b18cd 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=g...@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/44086b097537a8157ee1dd98d6635b3503f2f534 Modified Files -------------- src/backend/access/heap/heapam.c | 78 +++++++++++++++++++------------- src/backend/access/heap/heapam_handler.c | 40 +++++++++++----- src/include/access/heapam.h | 2 +- 3 files changed, 75 insertions(+), 45 deletions(-)