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 1seaq6-009GOj-S5 for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Aug 2024 13:48:30 +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 1seaq5-00GtVw-HI for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Aug 2024 13:48:29 +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 1seaq5-00GtVi-7m for pgsql-hackers@lists.postgresql.org; Thu, 15 Aug 2024 13:48:29 +0000 Received: from fhigh6-smtp.messagingengine.com ([103.168.172.157]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1seapz-004zjw-8O for pgsql-hackers@lists.postgresql.org; Thu, 15 Aug 2024 13:48:28 +0000 Received: from phl-compute-01.internal (phl-compute-01.nyi.internal [10.202.2.41]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 0E25D1151C47; Thu, 15 Aug 2024 09:48:22 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Thu, 15 Aug 2024 09:48:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding: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=1723729702; x=1723816102; bh=IrIabMzJKzNzxp/qnEr3D8CFjGIY2Qe9 4UUvuyvu350=; b=WGxRE6xki3Vyd4VFAqRDZGEj4VD7tySAr4sbxj9ggh0yY5oo oITHkFByExRCfMQ26rf24ml9kjAAgrP5AJSgGIKVAZWUwl/e9M5pQbFqlpKFuS87 Jkr4MM5jGyk2CWvnk7BjO2nf4MyAyCFkkKCKl9sKb4Ek/A8z7yUG3C7hYXp4TijL KVcOM/khYpgvCN2ecDjHmZNvL8/TQkkEJShU1M6OEqM7N9V5iABanVInEMQRPTnh eEi9ccxI7CuwodQ+Ix3DaVbJqkosXhVPZIPFY8ei94Tn+XdxR58XqmcgOY7pFwK9 FEin6Pt/fa0pB+KPGOQU7eJoCX69y1pO4swjIA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1723729702; x= 1723816102; bh=IrIabMzJKzNzxp/qnEr3D8CFjGIY2Qe94UUvuyvu350=; b=E onHbcfJvXv4uMl3YegxO29c8Jfeq79Wl2etFBbBzZ3EQbdh1RGccgn+Q/A7GQt7M 90dFYniFsUMmfbWJjiwCiZFgrLfOnW7jGcR+3xOr/Jk4U+/frrX/j9CadZgLhoPo Pijg7/N0sjhVmS89NeX2K8fjJU8WBytG7ZaEEoj2lKEmErmHfiZZCG5DJRWR8dWu iaQZBZ1/6YgW8uhqIP9dTEkIvAr+Mki7vmoSTB953pseWfAPjaonHTVD9/zrocSu wfEX4y7gEzz0vnKlSx/v8NFBfYWzoajyEZn+uyqQnHMOTvLqc+XVj8JJ/KjFP1qe /p8H1PXZdPQSIMGPKxZGQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddruddtiedgieekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfufevfhfhvfgjtgfgsehtjeertddtvdej necuhfhrohhmpefrvghtvghrucfgihhsvghnthhrrghuthcuoehpvghtvghrsegvihhsvg hnthhrrghuthdrohhrgheqnecuggftrfgrthhtvghrnhepjedukeeiudffgedvveeuteef tdejhedtveejteekgeevuedvtedugeekiedvffdunecuffhomhgrihhnpehpohhsthhgrh gvshhqlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpehpvghtvghrsegvihhsvghnthhrrghuthdrohhrghdpnhgspghrtghpthhtoh epgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepthhomhgrshesvhhonhgurhgr rdhmvgdprhgtphhtthhopegrnhgurhgvshesrghnrghrrgiivghlrdguvgdprhgtphhtth hopegsohgvkhgvfihurhhmodhpohhsthhgrhgvshesghhmrghilhdrtghomhdprhgtphht thhopehpghhsqhhlqdhhrggtkhgvrhhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdroh hrgh X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 15 Aug 2024 09:48:20 -0400 (EDT) Message-ID: <86763810-70a1-4872-8ba7-1676f788e5a2@eisentraut.org> Date: Thu, 15 Aug 2024 15:48:19 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Parallel CREATE INDEX for BRIN indexes Cc: Andres Freund , Matthias van de Meent , PostgreSQL Hackers References: <99f9ecbe-0976-8012-67b5-dbff58c7dbec@enterprisedb.com> <32e3f645-389d-87f9-2ce7-33d0087f47d4@enterprisedb.com> <3733d042-71e1-6ae6-5fac-00c12db62db6@enterprisedb.com> <20240413083635.47yve2c5pp2xt5b6@awork3.anarazel.de> <4a9c0545-6697-47d3-bf7c-2f5d0d7a7319@enterprisedb.com> <1df00a66-db5a-4e66-809a-99b386a06d86@enterprisedb.com> Content-Language: en-US From: Peter Eisentraut To: Tomas Vondra In-Reply-To: <1df00a66-db5a-4e66-809a-99b386a06d86@enterprisedb.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 13.04.24 23:04, Tomas Vondra wrote: >>> While preparing a differential code coverage report between 16 and HEAD, one >>> thing that stands out is the parallel brin build code. Neither on >>> coverage.postgresql.org nor locally is that code reached during our tests. >>> >> >> Thanks for pointing this out, it's definitely something that I need to >> improve (admittedly, should have been part of the patch). I'll also look >> into eliminating the difference between BTREE and BRIN parallel builds, >> mentioned in my last message in this thread. >> > > Here's a couple patches adding a test for the parallel CREATE INDEX with > BRIN. The actual test is 0003/0004 - I added the test to pageinspect, > because that allows cross-checking the index to one built without > parallelism, which I think is better than just doing CREATE INDEX > without properly testing it produces correct results. These pageinspect tests added a new use of the md5() function. We got rid of those in the tests for PG17. You could write the test case with something like SELECT (CASE WHEN (mod(i,231) = 0) OR (i BETWEEN 3500 AND 4000) THEN NULL ELSE i END), - (CASE WHEN (mod(i,233) = 0) OR (i BETWEEN 3750 AND 4250) THEN NULL ELSE md5(i::text) END), + (CASE WHEN (mod(i,233) = 0) OR (i BETWEEN 3750 AND 4250) THEN NULL ELSE encode(sha256(i::text::bytea), 'hex') END), (CASE WHEN (mod(i,233) = 0) OR (i BETWEEN 3850 AND 4500) THEN NULL ELSE (i/100) + mod(i,8) END) But this changes the test output slightly and I'm not sure if this gives you the data distribution that you need for you test. Could your check this please?