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 1wEZqz-004A9P-0C for pgsql-hackers@arkaria.postgresql.org; Sun, 19 Apr 2026 21:38:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wEZqx-00GRok-0G for pgsql-hackers@arkaria.postgresql.org; Sun, 19 Apr 2026 21:38:55 +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.96) (envelope-from ) id 1wEZqw-00GRoc-1j for pgsql-hackers@lists.postgresql.org; Sun, 19 Apr 2026 21:38:54 +0000 Received: from fhigh-b4-smtp.messagingengine.com ([202.12.124.155]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wEZqu-00000001pCi-1JxG for pgsql-hackers@lists.postgresql.org; Sun, 19 Apr 2026 21:38:53 +0000 Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfhigh.stl.internal (Postfix) with ESMTP id 57C087A0161; Sun, 19 Apr 2026 17:38:51 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-02.internal (MEProxy); Sun, 19 Apr 2026 17:38:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1776634731; x=1776721131; bh=PIP0fyLscA akhlN/T3wipLSymwiGUk15DlTUGBxy1Sg=; b=Z4dA4MFu0YtNLMHixf7KuDX5cZ X+L83kjDvNRYJNdfxNAyd12/ohNjq+8K43Tj/BtFSR3Ei/XimxzGgL5xPRx6sfwG E0MigBNRUtY72Ul09YwiMOufLDs/HI9LzHtlEiQ/RO1dy/CpQJ5wuEYzV51gRnlx mV6kp9TJcfIoB8GA+wDI2r4bWXw7FR6xu69/6ihvshxfPjWDO1JxPeILDQFrm4VT 4LqxntbeKyZSthJnsRTn0Ng5oT3uZYM1rnCz5EDTg+2VEWmVCDOotZAWAtbyl53x Wpire85ngtt7LYt9b3pJT5u4f91biMS0SsbZvEsdRFEuoV4UFpDQ80RiJFLg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1776634731; x=1776721131; bh=PIP0fyLscAakhlN/T3wipLSymwiGUk15DlT UGBxy1Sg=; b=j9wssTViKrR3Yf0N324vXBd58YMf9l5HdDmbq6RErDoVQAavFBE jmEjr1ojDEjhz46AJQgGHYp5ALeivQPS29ceI1MzKO1IQU1kEEcBGypgsG+fSfxS QddcqlB8+T0nAaDuJw5PBPZhn+yWvO8UwC10RvGO+c4pkghQZGB4UzU2vWisb5Id BtUSDNEko4e2v5doLonTevP7VrT0E93/WcUezb0V3TvIC/HuCUC+BE6Bi5pLloTQ e/cnSihW9EQBOMlBS6VZyBJBeivw+K6w0OwqawP6q87eHAGsTxRhv0EQRe996Sqa u01yfjo8Nmvav0SN8FaSHMgHVoEo5jRI44A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdehieejgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlh cuvffnffculdejtddmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvden ucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprghquh hivghrrdighiiiqeenucggtffrrghtthgvrhhnpeetleeifedufffhhfdtteelgeeggeff hfekueevteeigfduudevudetgfegiedvjeenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiiipdhn sggprhgtphhtthhopeehpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegughhroh iflhgvhihmlhesghhmrghilhdrtghomhdprhgtphhtthhopehgrhgvghessghurhgurdhm vgdprhgtphhtthhopehrrghnihgvrhdrvhhfsehgmhgrihhlrdgtohhmpdhrtghpthhtoh epuggrnhhivghlseihvghsqhhlrdhsvgdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgv rhhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 19 Apr 2026 17:38:48 -0400 (EDT) Date: Mon, 20 Apr 2026 06:38:43 +0900 From: Michael Paquier To: David Rowley Cc: Greg Burd , Ranier Vilela , Daniel Gustafsson , PostgreSQL Hackers Subject: Re: [PATCH] Add tests for Bitmapset Message-ID: References: <2D90FFB0-C80A-4189-A5BF-C37F05E271D7@greg.burd.me> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="sRiIgLg3aXF1NC5O" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --sRiIgLg3aXF1NC5O Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 18, 2026 at 09:06:02PM +1200, David Rowley wrote: > On Fri, 10 Oct 2025 at 11:30, Michael Paquier wrote: > > Thanks for double-checking. Applied after running an indent. >=20 > I was working on test_bitmapset.c to add some tests for a new > bitmapset function. I noticed a few weird things. >=20 > 1. test_random_operations() is coded to use GetCurrentTimestamp() as a > seed when the given seed is <=3D 0. Of course, it'll be a while before > the return value of that wraps beyond 2^63 (292250 years), but I still > can't help but think that NULL is a better value to use to have the > seed auto-generate. Fine by me. > 2. Doing #1 means the function can't be STRICT. I do think it's wrong > that the function is marked as strict. That's normally reserved for > functions that we needn't call because NULL input(s) yield a NULL > output. That's not the case for this function. Using the existing HEAD approach where STRICT avoids these extra NULL checks, or adding explicit NULL checks without STRICT does not strike me as a big difference in this context. > 3. There's no CHECK_FOR_INTERRUPTS() in test_random_operations(). If > someone uses a large num_ops, there's no way to cancel the query. > 4. If there happened to be some rare bug in bitmapset.c that > test_random_operations() we might struggle to find it again, as we > don't report which seed we used in the ERROR message. These make sense. > I felt it was worth fixing these now as the function I plan to add > there does #1, #2, #3 and #4. If I add the new function for v20, the > discrepancy seems questionable. It is a test module, it would be a big issue if new pieces are backpatched in this area. In short I'm fine with these. Thanks for asking. -- Michael --sRiIgLg3aXF1NC5O Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmnlS2MACgkQnvQgOdby QH2LbBAAlK6IPT+5GduPO11fLJ7L7bkaXbBXqrqAE3CnfIYjYA04x9Ux9mGQQ4dM RSkS7ghilibtT6W5gJpT2mG/q+y5qKd11ojj7wr+J7oaSvm1piRadO0DN1BheB5M EhMjc9Y3bPm3BC377lqqJkwOnVwz+Qyzl/c2hrtxLuqbEafP8K51HYQfU2Xr6dXT n9hBJuG3smiFZN+rIe9zOM1dI15P10Q71O7ff1gUkjKk4Jv4NaTJyu7y8yRnrsjR P006VfpWhFuOOc6KaE4oQ+HGRrpeRqLoN8glLX0FXf18TDX/Ez/H9nECs5cWC4on gwTa76NaGPeGzNQZ9wPpV1vxsPOKdIGuSUFchdmmbieuMnDcsSfwiPAliN/W3QFb 3QsqaM89lbv9sFfVtXL/Og6qL87ft9jc9qJ5nggTQ0qBYmt4/xqjMJt9j6BcwNKu pLSk03dhnCH981bQQxS3kWxNhPpf4vA6mAZ/17PZM7wub8hwwaKXUxt2WBUkjdr/ vmOMHXr+RewDTdlzWpNSFRs1XoqlVkfx2vCQIJ6eMhPiS4FbdwlcAkvXnjFM5k24 7LS/cyi030K0T10/h1Of91pxZNsc7hRTcB9QN6sKgnkm4aaIBM68FjDSnjmOZn+C s24/QiAlM3+D8sLC4+ltyTwOtwQRez2EQwJwjcqdJj0ZQ3oiNO4= =5Ohy -----END PGP SIGNATURE----- --sRiIgLg3aXF1NC5O--