Re: dummy relation in partitionwise join

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: dummy relation in partitionwise join
Дата
Msg-id CAApHDvqoSjF=-c4oOp8fphGY=qJAa_EzNkaR2U=qQuDxr=OT2Q@mail.gmail.com
обсуждение исходный текст
Ответ на dummy relation in partitionwise join  (Zhihong Yu <zyu@yugabyte.com>)
Ответы Re: dummy relation in partitionwise join  (Zhihong Yu <zyu@yugabyte.com>)
Список pgsql-hackers
On Fri, 29 Oct 2021 at 04:43, Zhihong Yu <zyu@yugabyte.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Minimal logical decoding on standbys
Следующее
От: Zhihong Yu
Дата:
Сообщение: Re: dummy relation in partitionwise join