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 1wCDn4-001m3D-0T for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Apr 2026 09:41:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wCDn2-00634x-0O for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Apr 2026 09:41:09 +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 1wCDn1-00634p-2g for pgsql-hackers@lists.postgresql.org; Mon, 13 Apr 2026 09:41:08 +0000 Received: from fout-a6-smtp.messagingengine.com ([103.168.172.149]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wCDmz-00000000oPH-3fHW for pgsql-hackers@postgresql.org; Mon, 13 Apr 2026 09:41:08 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.phl.internal (Postfix) with ESMTP id 22556EC0433; Mon, 13 Apr 2026 05:41:04 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Mon, 13 Apr 2026 05:41:04 -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=fm1; t=1776073264; x=1776159664; bh=LJroVSo5JOmfQW0WMgtc69J2mUgJgJrK dts6qPoVXtU=; b=rFUoegswZ5Ii8xjYm3EozzexTQhCnWrgRr3pC3f2BKbcKbHi 9GQgUaxwUG0ISaiOJPgcX8xBjcW8+1uDZvl+FR9ax42MhEAa6xEQm1QtZaZxHP1U qeqVpu+xzna9pqe2HUG3s4NPES4Bz7omrMQqRWeBPMsJTGHPz5oBUvx3QSZ+B2sh qCaKXsmWZ4HHp7IF03J+RdBPc44iZxMZNLY3TkKfWALUebE8FoMofTKbxMbcvtrM orl+ocElazy4i8bYS+HDpYj6Y66YPHITICup9pAdiB+/926Aigpszepg99Y5gslG sldMVB7dexSPjx77XFSJpdT8zVFwPPxjR1zW1Q== 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-sender:x-me-sender:x-sasl-enc; s=fm2; t=1776073264; x= 1776159664; bh=LJroVSo5JOmfQW0WMgtc69J2mUgJgJrKdts6qPoVXtU=; b=I lB9IshsEQmxM40+aCIpo3h7F8MQqdfZJYA4CDTy6q8NNSHD8f9O9NdkHE1+55SCW l/HrGcQIpYUh+hXxurrbyyvMmmmik+5ik9reaYzW1KvHkJ5WnaeYs9oUX1b1IcNu qEZVdzUPlBEtx+0PHb2a/gNouD7pLI8VdYt4yNVMvPhfB2mgFjuknRIglUzs/Y5V JqYgjPczAR9lm4nb9K9kyJJq7XrAgLVfKhLGpZJhbtERwm8WBzKfVEeI+RjgcCpP l1FMZTJwGSS2fYSGXm181NOSHmTUOPVzCk/3UEHBWdn9Jy3+/37miwUBJSAooGQo aObqYGnrLIANbwqcgruFA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdefjeeltdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomheprfgvthgvrhcu gfhishgvnhhtrhgruhhtuceophgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhgqeenuc ggtffrrghtthgvrhhnpeeljedtudfggffffefhieetfeehtedukeejuedtlefhgefgffdu jeehueefudffkeenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhesvghi shgvnhhtrhgruhhtrdhorhhgpdhnsggprhgtphhtthhopeehpdhmohguvgepshhmthhpoh huthdprhgtphhtthhopegsvghrthhrrghnuggurhhouhhvohhtrdhpghesghhmrghilhdr tghomhdprhgtphhtthhopehhlhhinhhnrghkrgesihhkihdrfhhipdhrtghpthhtohepgh gvihgurghvrdhpghesghhmrghilhdrtghomhdprhgtphhtthhopegsohgvkhgvfihurhhm odhpohhsthhgrhgvshesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhhrg gtkhgvrhhssehpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 13 Apr 2026 05:41:03 -0400 (EDT) Message-ID: <2a2f9cb0-f00d-413c-8517-4a3ad220d104@eisentraut.org> Date: Mon, 13 Apr 2026 11:41:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Reduce build times of pg_trgm GIN indexes To: Bertrand Drouvot , Heikki Linnakangas Cc: David Geier , Matthias van de Meent , pgsql-hackers References: <5d366878-2007-4d31-861e-19294b7a583b@gmail.com> <9ac3931a-180e-4283-a7a8-05eb66099206@iki.fi> <2e11134f-02c3-43da-8c39-fb520a1a251d@iki.fi> <66620ec7-0f81-4813-9cf1-b901a56efcc3@gmail.com> <2a76b5ef-4b12-4023-93a1-eed6e64968f3@gmail.com> <6439c655-e281-409d-b884-6586750d5820@iki.fi> Content-Language: en-US From: Peter Eisentraut In-Reply-To: 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 09.04.26 13:28, Bertrand Drouvot wrote: > Hi, > > On Tue, Apr 07, 2026 at 02:27:40PM +0300, Heikki Linnakangas wrote: >> On 03/03/2026 19:31, David Geier wrote: >>>> Attached are the patches rebased on latest master. >>>> >>>> I've removed the ASCII fast-path patch 0006 as it turned out to be more >>>> complicated to make work than expected. >>>> >>>> I kept the radix sort patch because it gives a decent speedup but I >>>> would like to focus for now on getting patches 0001 - 0004 merged. >>>> They're all simple and, the way I see it, uncontroversial. >>>> >>>> I remeasured the savings of 0001 - 0004, which comes on top of the >>>> already committed patch that inlined the comparison function, which gave >>>> another ~5%: >>>> >>>> Data set | Patched (ms) | Master (ms) | Speedup >>>> --------------------|--------------|--------------|---------- >>>> movies(plot) | 8,058 | 10,311 | 1.27x >>>> lineitem(l_comment) | 223,233 | 256,986 | 1.19x >>>> >>>> I've also registered the change at the commit fest, see >>>> https://commitfest.postgresql.org/patch/6418/. >>> >>> Attached is v5 that removes an incorrect assertion from the radix sort code. >>> >>> v5-0001-Optimize-sort-and-deduplication-in-ginExtractEntr.patch >>> v5-0002-Optimize-generate_trgm-with-sort_template.h.patch >>> v5-0003-Make-btint4cmp-branchless.patch >>> v5-0004-Faster-qunique-comparator-in-generate_trgm.patch >>> v5-0005-Optimize-generate_trgm-with-radix-sort.patch >> >> Pushed 0001 as commit 6f5ad00ab7. > > This commit makes use of StaticAssertStmt() that has been deprecated in > d50c86e74375. The attached, fixes it. I think the position of the static assertion is correct, because it refers to the palloc0_array() that follows. Maybe the comment could be a bit clearer, like "using palloc0_array requires GIN_CAT_NORM_KEY==0"?