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 1v6hRw-008MVj-8U for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Oct 2025 03:36:16 +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 1v6hRu-00FJD9-03 for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Oct 2025 03:36:14 +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 1v6hRt-00FJCq-Ml for pgsql-hackers@lists.postgresql.org; Thu, 09 Oct 2025 03:36:14 +0000 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1v6hRp-0019Y3-2N for pgsql-hackers@lists.postgresql.org; Thu, 09 Oct 2025 03:36:14 +0000 Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-59052926cf9so556211e87.1 for ; Wed, 08 Oct 2025 20:36:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759980968; x=1760585768; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=RIq3aNhLSCtxZtK1SvqQwq1mRD86mt4518GJ6oZGn+A=; b=aMuAIi6+fJeEXi/xVKXzQkdWZQ2q6MhVzEpowB4xays0OFHc0urdzsrB2AMQXGJmKT kGbAhV2+JxPKm3jPkEIk8IwVkhO8NKHJTqrLfMbaaWBYUK+UGCBx+2irO/nd51aJ2Ilo UZJgIPrZyXZigf10w24+uYp6w+hkiAEdqe2I8BEXZxlgr6m3Ui2rIqg2i2iVsdovGsCV iNICVR9dhiiu06uSh8JwoFfHBK35GsM9uHcC0LPWFUSNtPvoP9QJZAISOSNrE7nUM9VD 0WfdtdNmljlI/vcJ8cBr487IN/BEVxJPz7/zVYa1FNfjUFNJPmo2qlw/c4UT0d0GV7RP FogA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759980968; x=1760585768; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=RIq3aNhLSCtxZtK1SvqQwq1mRD86mt4518GJ6oZGn+A=; b=GXFRkAFD/AnwNPwW0FSlBvFKedKhzsu/LbT+EKgYIx6NoJNpc5Nkw+0gf07QtVkCrI Abnk4H0es4zXHP6dTeYRmbIfm5VVM8mNsaHSvFAAYmOaIEST/sPx50OhQa67JXCvwAFl Wpm+nikQXv8nbH/NBHmGcImEMfFii/bvt3kGc39Sh2+Ofa8eRH4Ab+TV4FnfnXX+CKoW HTMM4fRRkNhhDiQOSJ1vU3fK/jDW1V7KvjNIzz6si0nkG25CuTr+NgBE/qQbRSHl4ymi PnkPI+Cp/v4JVFZOvV1HsV/Bfr90DL0O/ygSGgNUZlvq683shBBkgmY0TCS5C4WVKhdN KCTQ== X-Forwarded-Encrypted: i=1; AJvYcCV8cauFULHJoGrAO1HYbOOoS3/SLMGUAyU1rqnPFojZXKA3L745ykk8fFTnViE1Qf86gzD3pYe4+jz4QHFu@lists.postgresql.org X-Gm-Message-State: AOJu0Yyy78cbGOSTlVNUP3fMgzdANJ1Xcjfdp19VL8CifOk1EDR9UuIM vhidSKxvrLSguMjyS9LKsLs7E6B2r1Dik8w7HS6b55OC2utDytvi7WWRXS7UiMpshDLGciB+vzg IZ5Zuw4rinvNFozQrtZ0t2xsm8aRfBhY= X-Gm-Gg: ASbGnctjZW9lv2FaM4LkrtOBMUXSS9kBrgIV/RcRfWiDR+ruQX5tKVReV0vKpG518Tk VxGjE0MmP3l+86EmWa3hpbeHMJKfzPk0kIK9O13ckOifX4R34OIT+irM18gMbPAkDE+Ximi/5Fs Ra86VcHwigbYW7IHoDPJXAgjU1YEiZ+2mADbvmBNB1+f4c+dWYodO3ODubhEP6kaJAO7FnfIM4G SpjQ9OjeYJankgaM/wtvjLhh1ksH0AOmmHLGRZuja6S49FIZth+ajv8T4JF3WC1aCaqReUOVoYr RVcrrrlD6LhFIg0Yu51FPA== X-Google-Smtp-Source: AGHT+IE2TCUygDOfpy+wTkMhi/nrLa5WqNpKmW2UkuTpWmGyjeIhAZ4k4QRs5pCP32jQUilGfyae1DPwQ9oKnVcm92c= X-Received: by 2002:a05:6512:3f27:b0:55f:3f03:946d with SMTP id 2adb3069b0e04-5906dd31abfmr1738312e87.23.1759980968247; Wed, 08 Oct 2025 20:36:08 -0700 (PDT) MIME-Version: 1.0 References: <2D90FFB0-C80A-4189-A5BF-C37F05E271D7@greg.burd.me> In-Reply-To: From: David Rowley Date: Thu, 9 Oct 2025 16:35:55 +1300 X-Gm-Features: AS18NWANfFx2HXMENPUsdzsEASOSkjt_FcJ2l20eybczr57wQBpsCeys8N-hWAo Message-ID: Subject: Re: [PATCH] Add tests for Bitmapset To: Michael Paquier Cc: Greg Burd , Ranier Vilela , Daniel Gustafsson , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 9 Oct 2025 at 15:13, Michael Paquier wrote: > What do you think about the attached? Thanks. Looks pretty good. > + members = palloc(sizeof(int) * num_ops); Any reason to pfree that and allocate that to the same size as it already was? Wondering if the "members[pos] = members[--num_members];" is worth a short comment. Maybe something like: /* zap this member by moving the final array member into its place and shrinking the array by 1 */ David