Re: Relids instead of Bitmapset * in plannode.h - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Relids instead of Bitmapset * in plannode.h
Date
Msg-id 941945.1699510121@sss.pgh.pa.us
Whole thread Raw
In response to Re: Relids instead of Bitmapset * in plannode.h  (Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>)
List pgsql-hackers
Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> writes:
> On Tue, Nov 7, 2023 at 8:54 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Yes, I'm pretty sure that's exactly the reason, and I'm strongly
>> against the initially-proposed patch.  The include footprint of
>> pathnodes.h would be greatly expanded, for no real benefit.

> As I mentioned in [1] the Bitmapset implementation is not space
> efficient to be used as Relids when there are thousands of partitions.

TBH, I'd be very strongly against "optimizing" that case by adopting a
data structure that is less efficient for typical rangetable sizes.
I continue to think that anybody who is using that many partitions
is Doing It Wrong and has no excuse for thinking it'll be free.
Moreover, the size of their relid sets is pretty unlikely to be
their worst pain point.

In any case, that is a poor argument for weakening the separation
between planner and executor.  When and if somebody comes up with
a credible replacement for bitmapsets here, we can consider what
we want to do in terms of header-file organization --- but I do
not think including pathnodes.h into executor files will be it.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: A recent message added to pg_upgade
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: A recent message added to pg_upgade