From: | David Rowley <dgrowleyml(at)gmail(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Edmund Horner <ejrh00(at)gmail(dot)com>, David Fetter <david(at)fetter(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>, Alvaro Herrera <alvherre(at)2ndquadrant(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: | 2021-02-27 10:05:53 |
Message-ID: | CAApHDvrxaKMBrV-Tr3ogLaNJMSPC7_GGQWprsDg+HA3Ky0=m=g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, 19 Feb 2021 at 20:37, David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
>
> On Thu, 18 Feb 2021 at 09:45, David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
> >
> > On Wed, 17 Feb 2021 at 11:05, Andres Freund <andres(at)anarazel(dot)de> wrote:
> > > How does this interact with rescans?
> >
> > We must call table_rescan() before calling table_set_tidrange() again.
> > That perhaps could be documented better. I'm just unsure if that
> > should be documented in tableam.h or if it's a restriction that only
> > needs to exist in heapam.c
>
> I've changed things around so that we no longer explicitly call
> table_rescan() in nodeTidrangescan.c. Instead table_set_tidrange()
> does a rescan call. I also adjusted the documentation to mention that
> changing the tid range starts the scan again. This does mean we'll do
> a ->scan_rescan() the first time we do table_set_tidrange(). I'm not
> all that sure that matters.
I've pushed this now. I did end up changing the function name in
tableam.h so that we no longer expose the table_set_tidrange().
Instead, the range is set by either table_beginscan_tidrange() or
table_rescan_tidrange(). There's no need to worry about what would
happen if someone were to change the TID range mid-scan.
Apart from that, I adjusted a few comments and changed the regression
tests a little to get rid of the tidrangescan_empty table. This was
created to ensure empty tables work correctly. Instead, I just did
those tests before populating the tidrangescan table. This just makes
the test run a little faster since we're creating and dropping 1 less
table.
David
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2021-02-27 12:06:11 | Re: repeated decoding of prepared transactions |
Previous Message | Dilip Kumar | 2021-02-27 09:14:54 | Re: [HACKERS] Custom compression methods |