Re: Parallelize correlated subqueries that execute within each worker

From: James Coleman <jtc331(at)gmail(dot)com>
To: Zhihong Yu <zyu(at)yugabyte(dot)com>
Cc: Daniel Gustafsson <daniel(at)yesql(dot)se>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Subject: Re: Parallelize correlated subqueries that execute within each worker
Date: 2021-09-08 12:47:35
Message-ID: CAAaqYe-mts0pTD7B3b0+0g_aUwErEiL=mhGZfj9TEGmza-jt3Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 7, 2021 at 11:06 AM Zhihong Yu <zyu(at)yugabyte(dot)com> wrote:
>
>
>
> On Tue, Sep 7, 2021 at 6:17 AM James Coleman <jtc331(at)gmail(dot)com> wrote:
>>
>> On Wed, Sep 1, 2021 at 7:06 AM Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
>> >
>> > > On 7 May 2021, at 18:30, James Coleman <jtc331(at)gmail(dot)com> wrote:
>> >
>> > > ..here we are now, and I finally have this patch cleaned up
>> > > enough to share.
>> >
>> > This patch no longer applies to HEAD, can you please submit a rebased version?
>>
>> See attached.
>>
>> Thanks,
>> James
>
> Hi,
> For v2-0002-Parallel-query-support-for-basic-correlated-subqu.patch :
>
> + * is when we're going to execute multiple partial parths in parallel
>
> parths -> paths
>
> if (index->amcanparallel &&
> - rel->consider_parallel && outer_relids == NULL &&
> - scantype != ST_BITMAPSCAN)
> + rel->consider_parallel && outer_relids == NULL &&
> + scantype != ST_BITMAPSCAN)
>
> the change above seems unnecessary since the first line of if condition doesn't change.
> Similar comment for the next hunk.
>
> + * It's not a partial path; it'a a full path that is executed as a subquery.
>
> it'a a -> it's a
>
> + /* rel->consider_parallel_rechecking_params = false; */
> + /* rel->partial_pathlist = NIL; */
>
> The commented code can be taken out.

Thanks for taking a look at this.

See updated patch series attached.

James Coleman

Attachment Content-Type Size
v3-0001-Allow-parallel-LATERAL-subqueries-with-LIMIT-OFFS.patch application/octet-stream 3.5 KB
v3-0002-Parallel-query-support-for-basic-correlated-subqu.patch application/octet-stream 75.0 KB
v3-0003-Other-places-to-consider-for-completeness.patch application/octet-stream 5.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2021-09-08 12:54:25 Re: drop tablespace failed when location contains .. on win32
Previous Message Andrew Dunstan 2021-09-08 12:46:44 Re: Add jsonlog log_destination for JSON server logs