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 1s4pxo-001LhM-4v for pgsql-hackers@arkaria.postgresql.org; Wed, 08 May 2024 22:40:40 +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 1s4pxm-003FwT-9X for pgsql-hackers@arkaria.postgresql.org; Wed, 08 May 2024 22:40:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s4pxm-003FwG-0F for pgsql-hackers@lists.postgresql.org; Wed, 08 May 2024 22:40:38 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s4pxk-00058Z-0C for pgsql-hackers@lists.postgresql.org; Wed, 08 May 2024 22:40:37 +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 448MeXrR936563; Wed, 8 May 2024 18:40:33 -0400 From: Tom Lane To: David Rowley cc: Andrew Dunstan , Richard Guo , jian he , PostgreSQL Hackers Subject: Re: Revert: Remove useless self-joins *and* -DREALLOCATE_BITMAPSETS make server crash, regress test fail. In-reply-to: References: <1e6ca7b3-98e6-46b2-9982-97f92c7523d8@dunslane.net> <76910.1715106055@sss.pgh.pa.us> <276516.1715121616@sss.pgh.pa.us> <279607.1715122556@sss.pgh.pa.us> <282081.1715123889@sss.pgh.pa.us> <815049.1715192644@sss.pgh.pa.us> Comments: In-reply-to David Rowley message dated "Thu, 09 May 2024 10:07:22 +1200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <936561.1715208033.1@sss.pgh.pa.us> Date: Wed, 08 May 2024 18:40:33 -0400 Message-ID: <936562.1715208033@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk David Rowley writes: > I'm fine with this one as it's the same as what I already mentioned > earlier. I had imagined doing bms_del_member(bms_copy ... but maybe > the compiler is able to optimise away the additional store. Likely, it > does not matter much as pallocing memory likely adds far more overhead > anyway. I actually wrote it that way to start with, but undid it after noticing that the existing code in remove_rel_from_restrictinfo does it in separate steps, and thinking that that was good for both separation of concerns and a cleaner git history. I too can't believe that an extra fetch will be noticeable compared to the cost of the adjacent bms_xxx operations. regards, tom lane