Re: updated SORT/LIMIT patch - Mailing list pgsql-patches

From Tom Lane
Subject Re: updated SORT/LIMIT patch
Date
Msg-id 24168.1179411366@sss.pgh.pa.us
Whole thread Raw
In response to Re: updated SORT/LIMIT patch  (Gregory Stark <stark@enterprisedb.com>)
Responses Re: updated SORT/LIMIT patch  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Gregory Stark <stark@enterprisedb.com> writes:
> It doesn't look like the timing of the ExecRescan is an issue at all. There
> are plenty of nodes that Rescan their children much later than when they first
> start up. Even Nested Loop does so.

Right, but separating the child rescan from the tuplestore rescan bugs me.
Another problem is that the proposed patch does a child rescan call that
might (usually would) be unnecessary.

I am thinking that a cleaner fix is probably to make ExecRescanLimit do
the recompute_limits() bit immediately, so that the new limits are
available to the Sort node when it gets the rescan call.  The comment
about timing of recompute_limits() is referring to the fact that
parameters aren't set at ExecInitLimit() time, but I believe they are
(and should be) available at Rescan time.  Will give it a try anyway.

            regards, tom lane

pgsql-patches by date:

Previous
From: Gregory Stark
Date:
Subject: Re: updated SORT/LIMIT patch
Next
From: Andrew Dunstan
Date:
Subject: Re: UTF8MatchText