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.96) (envelope-from ) id 1wCo87-002KMf-11 for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Apr 2026 00:29:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wCo85-00Dafj-1y for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Apr 2026 00:29:18 +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.96) (envelope-from ) id 1wCo85-00Dafb-13 for pgsql-hackers@lists.postgresql.org; Wed, 15 Apr 2026 00:29:18 +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.98.2) (envelope-from ) id 1wCo83-000000017ZE-47pR for pgsql-hackers@lists.postgresql.org; Wed, 15 Apr 2026 00:29:17 +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 63F0T8sL1900290; Tue, 14 Apr 2026 20:29:08 -0400 From: Tom Lane To: David Rowley cc: Chao Li , PostgreSQL Developers Subject: Re: Add bms_offset_members() function for bitshifting Bitmapsets In-reply-to: References: <278B9FE3-F349-4494-99C5-483105C1C999@gmail.com> Comments: In-reply-to David Rowley message dated "Wed, 15 Apr 2026 11:45:12 +1200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1900288.1776212948.1@sss.pgh.pa.us> Date: Tue, 14 Apr 2026 20:29:08 -0400 Message-ID: <1900289.1776212948@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk David Rowley writes: > Your idea of checking the old highest member plus the offset seems a > more robust method, so I've adjusted the patch to use that. I question the decision to make this change the set in-place. Wouldn't it be cheaper and less surprise-prone to always make a copy? regards, tom lane