Re: Should consider materializing the cheapest inner path in consider_parallel_nestloop()

From: Tender Wang <tndrwang(at)gmail(dot)com>
To: "Fujii(dot)Yuki(at)df(dot)MitsubishiElectric(dot)co(dot)jp" <Fujii(dot)Yuki(at)df(dot)mitsubishielectric(dot)co(dot)jp>
Cc: Tomasz Rybak <tomasz(dot)rybak(at)post(dot)pl>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "robertmhaas(at)gmail(dot)com" <robertmhaas(at)gmail(dot)com>, Richard Guo <guofenglinux(at)gmail(dot)com>, David Rowley <dgrowleyml(at)gmail(dot)com>
Subject: Re: Should consider materializing the cheapest inner path in consider_parallel_nestloop()
Date: 2024-06-11 08:11:26
Message-ID: CAHewXNnSvL1M76-NKyns3F9uK1RvEBZMX8z3bQ2itpLn7ZjTfQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Fujii(dot)Yuki(at)df(dot)MitsubishiElectric(dot)co(dot)jp <
Fujii(dot)Yuki(at)df(dot)mitsubishielectric(dot)co(dot)jp> 于2024年6月5日周三 09:26写道:

> Hi. Tender.
>
> Thank you for modification.
>
> > From: Tender Wang <tndrwang(at)gmail(dot)com>
> > Sent: Tuesday, June 4, 2024 7:51 PM
> > Please add more tests. Especially please add some negative tests;
> > current patch checks that it is safe to apply materialization. It
> would
> > be helpful to add tests checking that materialization is not
> applied
> > in both checked cases:
> > 1. when inner join path is not parallel safe
> > 2. when matpath is not parallel safe
> >
> >
> >
> > I added a test case that inner rel is not parallel safe. Actually,
> > matpath will not create if inner rel is not parallel safe. So I didn't
> add test case for the second scenario.
> Is there case in which matpath is not parallel safe and inner rel is
> parallel safe?
> If right, I think that it would be suitable to add a negative test in a
> such case.
>

I looked through create_xxx_path(), and I found that almost
path.parallel_safe is assigned from RelOptiInfo.consider_parallel.
Some pathes take subpath->parallel_safe into account(e.g. Material path).
In most cases, Material is parallel_safe if rel is parallel
safe. Now I haven't come up a query plan that material is un parallel-safe
but rel is parallel-safe.

>
> Sincerely yours,
> Yuuki Fujii
>
> --
> Yuuki Fujii
> Information Technology R&D Center Mitsubishi Electric Corporation
>
>
>

--
Tender Wang
OpenPie: https://en.openpie.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bertrand Drouvot 2024-06-11 08:26:23 Re: Track the amount of time waiting due to cost_delay
Previous Message Heikki Linnakangas 2024-06-11 07:47:31 Re: Trying out read streams in pgvector (an extension)