Re: [HACKERS] Parameterization of partial path - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: [HACKERS] Parameterization of partial path
Date
Msg-id CAA4eK1KiQvqLDkap1S+pZqwLs7OB10PB=HeR8WtmRpd6EDOj+w@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Parameterization of partial path  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Thu, Feb 9, 2017 at 11:36 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Thu, Feb 9, 2017 at 12:36 PM, Antonin Houska <ah@cybertec.at> wrote:
>> When looking at try_partial_hashjoin_path and try_partial_nestloop_path
>> functions I'm failing to understand the comment "Parameterized partial paths
>> are not supported.".
>>
>> It's clear to me that GatherPath can't have parameters because repeated
>> execution of parallel plan with adjusted parameters is not supported.
>
> Actually, I think in theory that is fine.  You'd start up and shut
> down workers for every execution, which is likely to stink in terms of
> performance, but it should work OK.  The only problem is that it'll
> only work if you pass the values of the parameters down to the worker
> processes, which the code currently doesn't.
>

Another thing is that currently, we use the existing DSM for rescan.
If we really want to pass the params during rescan we might need some
work so that if we need more memory to pass the params at the time of
rescan, then we should be able to do that.  Now that we have DSA, I
think we can use that to pass the params during rescan if required.
However here the important point is that I have not come across any
plan (in the benchmarks like TPC-H) where it could be beneficial to
pass params during rescan, so not sure it is worth the effort to
invent something for that.  Now, it is possible that I am missing
something, but if someone can present a use case, then I think we can
try to support such parallel plans.

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: [HACKERS] Partition-wise join for join between (declaratively)partitioned tables
Next
From: Amit Kapila
Date:
Subject: Re: [HACKERS] Passing query string to workers