Re: Tid scan improvements

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Edmund Horner <ejrh00(at)gmail(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, David Steele <david(at)pgmasters(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Tid scan improvements
Date: 2019-07-22 07:24:51
Message-ID: CAKJS1f9GnALMYC+dcOmAB=jaoOY+pfHhbGqdwt49kNRe764XcA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 20 Jul 2019 at 06:21, Andres Freund <andres(at)anarazel(dot)de> wrote:
>
> Hi,
>
> On 2019-07-19 13:54:59 +1200, David Rowley wrote:
> > Did you imagined two additional callbacks, 1 to set the TID range,
> > then one to scan it? Duplicating the logic in heapgettup_pagemode()
> > and heapgettup() looks pretty horrible, but I guess we could add a
> > wrapper around it that loops until it gets the first tuple and bails
> > once it scans beyond the final tuple.
> >
> > Is that what you had in mind?
>
> Yea, I was thinking of something like 2. We already have a few extra
> types of scan nodes (bitmap heap and sample scan), it'd not be bad to
> add another. And as you say, they can just share most of the guts: For
> heap I'd just implement pagemode, and perhaps split heapgettup_pagemode
> into two parts (one to do the page processing, the other to determine
> the relevant page).
>
> You say that we'd need new fields in HeapScanDescData - not so sure
> about that, it seems feasible to just provide the boundaries in the
> call? But I think it'd also just be fine to have the additional fields.

Thanks for explaining.

I've set the CF entry for the patch back to waiting on author.

I think if we get this part the way Andres would like it, then we're
pretty close.

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2019-07-22 07:36:00 Re: [PATCH] minor bugfix for pg_basebackup (9.6 ~ )
Previous Message Tatsuro Yamada 2019-07-22 06:02:16 Re: progress report for ANALYZE