pgsql: Preliminary refactor of heap scanning functions - Mailing list pgsql-committers

From David Rowley
Subject pgsql: Preliminary refactor of heap scanning functions
Date
Msg-id E1rsDyw-000ObJ-Pf@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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=gEQ@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(-)


pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: [MASSMAIL] pgsql: pg_regress: Save errno in emit_tap_output_v() and switch to %m
Next
From: Michael Paquier
Date:
Subject: [MASSMAIL] pgsql: Coordinate emit_log_hook and all log destinations to share the s