Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r0yDm-008g92-5h for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Nov 2023 06:08:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1r0yDk-00BUD9-Gu for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Nov 2023 06:08:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r0yDk-00BUD0-7o for pgsql-hackers@lists.postgresql.org; Thu, 09 Nov 2023 06:08:52 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r0yDd-005U2s-MI for pgsql-hackers@lists.postgresql.org; Thu, 09 Nov 2023 06:08:51 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 3A968fcV941946; Thu, 9 Nov 2023 01:08:41 -0500 From: Tom Lane To: Ashutosh Bapat cc: Alvaro Herrera , PostgreSQL Hackers Subject: Re: Relids instead of Bitmapset * in plannode.h In-reply-to: References: <202311071106.6y7b2ascqjlz@alvherre.pgsql> <122451.1699370672@sss.pgh.pa.us> Comments: In-reply-to Ashutosh Bapat message dated "Thu, 09 Nov 2023 11:12:28 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <941944.1699510121.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Thu, 09 Nov 2023 01:08:41 -0500 Message-ID: <941945.1699510121@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Ashutosh Bapat writes: > On Tue, Nov 7, 2023 at 8:54 PM Tom Lane 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