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: Further refactor of heapgettup and heapgettup_pagemode
Date: Thu, 02 Feb 2023 22:49:01 +0000
Message-ID: <E1pNiO4-001Hpc-K1@gemulon.postgresql.org> (raw)

Further refactor of heapgettup and heapgettup_pagemode

Backward and forward scans share much of the same page acquisition code.
Here we consolidate that code to reduce some duplication.

Additionally, add a new rs_coffset field to HeapScanDescData to track the
offset of the current tuple.  The new field fits nicely into the padding
between a bool and BlockNumber field and saves having to look at the last
returned tuple to figure out which offset we should be looking at for the
current tuple.

Author: Melanie Plageman
Reviewed-by: David Rowley
Discussion: https://postgr.es/m/CAAKRu_bvkhka0CZQun28KTqhuUh5ZqY=_T8QEqZqOL02rpi2bw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f9bc34fcb664e93d1fa3c3873527dce6f4cc495f

Modified Files
--------------
src/backend/access/heap/heapam.c | 200 ++++++++++++---------------------------
src/include/access/heapam.h      |   1 +
2 files changed, 63 insertions(+), 138 deletions(-)



Message-ID: <E1pNiO4-001Hpc-K1@gemulon.postgresql.org>
Permalink:  ../E1pNiO4-001Hpc-K1@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1pNiO4-001Hpc-K1@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: drowley@postgresql.org
  Subject: Re: pgsql: Further refactor of heapgettup and heapgettup_pagemode
  In-Reply-To: <E1pNiO4-001Hpc-K1@gemulon.postgresql.org>
  References: <E1pNiO4-001Hpc-K1@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