Re: FETCH FIRST clause PERCENT option

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: ryan(at)rustprooflabs(dot)com
Cc: surafel3000(at)gmail(dot)com, tgl(at)sss(dot)pgh(dot)pa(dot)us, thomas(dot)munro(at)gmail(dot)com, andres(at)anarazel(dot)de, tomas(dot)vondra(at)2ndquadrant(dot)com, vik(dot)fearing(at)2ndquadrant(dot)com, hornschnorter(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org, andrew(at)tao11(dot)riddles(dot)org(dot)uk
Subject: Re: FETCH FIRST clause PERCENT option
Date: 2019-09-27 00:59:19
Message-ID: 20190927.095919.206703929.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Thu, 26 Sep 2019 15:13:42 -0600, Ryan Lambert <ryan(at)rustprooflabs(dot)com> wrote in <CAN-V+g_cG4_R9q25nccNoMrtwA7DsCuHh-G5_ygaj8PBFTWUDw(at)mail(dot)gmail(dot)com>
> On Thu, Sep 19, 2019 at 6:52 AM Surafel Temesgen <surafel3000(at)gmail(dot)com>
> wrote:
>
> > Hi Tom,
> > In the attached patch i include the comments given
> >
> > regards
> > Surafel
> >
>
> Patch v9 applies and passes make installcheck-world.
>
> > From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> > Date: 2019-09-05 22:26:29
>
> > * I didn't really study the changes in nodeLimit.c, but doing
> > "tuplestore_rescan" in ExecReScanLimit is surely just wrong. You
> > probably want to delete and recreate the tuplestore, instead, since
> > whatever data you already collected is of no further use. Maybe, in
> > the case where no rescan of the child node is needed, you could re-use
> > the data already collected; but that would require a bunch of additional
> > logic. I'm inclined to think that v1 of the patch shouldn't concern
> > itself with that sort of optimization.
>
> I don't think this was addressed.

It seems to me that Tom is suggesting to conisider that kind of
optimization after once completing the patch without it. (That in
the first patch was just wrong, but more stuff is needed to
achieve that.)

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2019-09-27 01:22:13 Re: [PATCH] Race condition in logical walsender causes long postgresql shutdown delay
Previous Message Kyotaro Horiguchi 2019-09-27 00:46:47 Re: shared-memory based stats collector