Re: dummy relation in partitionwise join

From: Zhihong Yu <zyu(at)yugabyte(dot)com>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: dummy relation in partitionwise join
Date: 2021-10-28 21:22:52
Message-ID: CALNJ-vTVdG8z6sHymhZ723SZ0pCzAzBOVc9iworvOf2wEXxQcQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Oct 28, 2021 at 2:19 PM David Rowley <dgrowleyml(at)gmail(dot)com> wrote:

> On Fri, 29 Oct 2021 at 04:43, Zhihong Yu <zyu(at)yugabyte(dot)com> wrote:
> > I noticed that the dummy relation is skipped in the loop over
> rel->live_parts.
> > I wonder if the following change is sensible.
>
> I made the definition of live_parts to be partitions that survived
> partition pruning. There's a few reasons why a RELOPT_BASEREL could
> have dummy rels in its live_parts Bitmapset, so I don't see why we
> should make an exception and remove them from RELOPT_OTHER_JOINREL.
>
> If you think we should change the definition of what live_parts is,
> then you'd need to come up with a patch that did it for everything.
>
> However, I don't really think I'm for changing that. We currently set
> live_parts for RELOPT_BASEREL just after we perform partition
> pruning, so we could well have many bits set in that field for
> relations that will become dummy rels later. At what point could code
> looking at the live_parts field know that the bits that are set are
> never dummy rels? Or would they always just have to check for dummy
> rels just in case the bits are not unset for the dummy rels yet?
> Seems a bit messy to me.
>
> David
>
Hi,
Thanks for the reply.

We can leave the code as is.

Cheers

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2021-10-28 22:05:34 Re: Improve logging when using Huge Pages
Previous Message David Rowley 2021-10-28 21:19:10 Re: dummy relation in partitionwise join