Re: [HACKERS] parallelize queries containing initplans - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] parallelize queries containing initplans
Date
Msg-id 19264.1510675214@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] parallelize queries containing initplans  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [HACKERS] parallelize queries containing initplans  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Tue, Nov 14, 2017 at 12:00 AM, Amit Kapila <amit.kapila16@gmail.com> wrote:
>> Am I missing something?  Do you have some test or shape of the plan in
>> mind which can cause a problem?

> The problem would happen if the plan for InitPlan $1 in the above
> example itself referenced a parameter from an upper query level, and
> the value of that parameter changed, and then this section of the plan
> tree was rescanned.  I'm not sure I can write a query like that
> off-hand, but I think it's possible to do so.

Yeah, I'm sure it is.  I have a vague recollection that there might be
existing regression test cases exercising such things, though I won't
swear to that.  The "orderstest" bit in subselect.sql looks like it
might be meant to do that...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] parallelize queries containing initplans
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] SQL procedures