pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Rowley <drowley@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Preliminary refactor of heap scanning functions
Date: Thu, 04 Apr 2024 03:41:43 +0000
Message-ID: <E1rsDyw-000ObJ-Pf@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1rsDyw-000ObJ-Pf@gemulon.postgresql.org>
Permalink:  ../E1rsDyw-000ObJ-Pf@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rsDyw-000ObJ-Pf@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: drowley@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Preliminary refactor of heap scanning functions
  In-Reply-To: <E1rsDyw-000ObJ-Pf@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox