Re: [HACKERS] parallelize queries containing initplans

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>, Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] parallelize queries containing initplans
Date: 2017-11-14 16:00:14
Message-ID: 19264.1510675214@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Tue, Nov 14, 2017 at 12:00 AM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-11-14 16:14:51 Re: [HACKERS] SQL procedures
Previous Message Robert Haas 2017-11-14 16:00:13 Re: [HACKERS] parallelize queries containing initplans