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 1wCIsC-001qrX-0X for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Apr 2026 15:06:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wCIsA-007Vam-1D for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Apr 2026 15:06:47 +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 1wCIsA-007Vac-0I for pgsql-hackers@lists.postgresql.org; Mon, 13 Apr 2026 15:06:46 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wCIs9-00000000ofv-01SG for pgsql-hackers@postgresql.org; Mon, 13 Apr 2026 15:06:46 +0000 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-48897fd88ebso49111465e9.2 for ; Mon, 13 Apr 2026 08:06:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776092803; x=1776697603; darn=postgresql.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=QLbjtZ3aEI0f7k9lTtxFK8YKjbSRXHSGgTPO/ejtxiY=; b=RVvzfp8rJp92W7wPlJF9Og3Gbxor6+MtVSpUKIq/AJDnqhs3Bl8RhzzZUdkXpbU/zE e7Ymw0Ar90JWs1rins8Q+vIc7sTb9dW1yxUkt3nFDu2EpqawwcQ+PbpiyNe+ircyiKF9 IjpV8DDrD74O8cJnddNJIOgj2pK+lTbvvOvwy4K0avaxE8OVpLx1QW3iHmkeaVecbsH+ Bg0ySx2xZyr0EpfXA5dTm54HDwConlDPPx8cyxQpUItrRb4NaI88mq8mG2fZ22i+g0Yz p+agDsdTpQVudIFqcQw/AOumASz/MrSteTeWukb4phbbZEnCmfROGJZGodx2r/2ZteeD qDKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776092803; x=1776697603; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=QLbjtZ3aEI0f7k9lTtxFK8YKjbSRXHSGgTPO/ejtxiY=; b=mARGvuYcdWXlRLWjA/CK/KeQlcKt53A7sfYbUYTnfk9bzJ32nTAlw4Q6CoVK079aN7 ko/u6+fQTTuSg+tbWqjGNH2Z4DxsC/ZLG+tqWyxffl897Z2XfNAvFXGxKq4ngH3JlW48 sN9A4F9ITbRd1aClNMj89cM+2Xfs3jORuhsSFj40MgODeDKjvzEZh8wdnip5HOsBBzxG NVLdHe7HbFxISIEU1Vb8aigR3tJ4W8CxWx8+Ia9WOeLjwiBk3nA4drYISF1sMok3P6rz XQdXhKxcSDxfZu/h2vNmGJEnsKP34HmUon1AUMx5yiB2jor0NJpi/RQ2Hn8nVDAwPrJn 47ww== X-Gm-Message-State: AOJu0Yw92INS/Qz81TpazHQlbcu9YAhsCveMz46ZDw36NPFGTpGizMA+ yYvTkAcdrgZJ/YLfo8RcrgR/9YM8uJgp2UbrSknUpDasldCdP37SSudx X-Gm-Gg: AeBDieu973c4y3H38jvgHOy5+GgUoL6y3Q4Yw/2++dpUh8nawpZslctLMBNJctgns61 PzAyM89SjgpEWQ3AM4shtoFOwJn40ZUGAhwdhEX9c+3mESss2Cas+uEMcqSBwtIzKi0xPWbnAD2 jaD7z90MyrQrvmJcZ3tUDWW5GNEuhyEAeh4pPtMtcWdsb1XKPWWq6XCzvSsZFehgLuek3R/m+l9 bS2Isi+LM5Punqgulc1Bvid5RdYgyXxWRPEAlsgTg79agt9bh/vTdh84DafbO3A40DBHhyF/ozl HRPk/oxuh2SzPKgCub8npMYZ9HonaH0HHDBy7ncBBvxHU59mAc/pvFUpA+jfH5eCojFtm0eTHwb ZYiuq4MfEYkMaJH3cQCUfm8mY6vHL9UosbVlVfza104vdTtLRDmmID1a8oVPm7ED8xN3Ffc/3P7 I7UpOETjupmZwbK8JuVZbHvaXdVbj2tpg= X-Received: by 2002:a05:600c:a401:b0:485:3f1c:d8a1 with SMTP id 5b1f17b1804b1-488d6839be2mr149200515e9.9.1776092802681; Mon, 13 Apr 2026 08:06:42 -0700 (PDT) Received: from [172.31.5.233] ([147.161.235.32]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488d53808b2sm372253395e9.11.2026.04.13.08.06.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Apr 2026 08:06:41 -0700 (PDT) Message-ID: <5e74f77a-1dfc-45b5-9fcf-62afe8dbbaf2@gmail.com> Date: Mon, 13 Apr 2026 17:06:40 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Reduce build times of pg_trgm GIN indexes To: Heikki Linnakangas , Matthias van de Meent Cc: 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: David Geier In-Reply-To: <6439c655-e281-409d-b884-6586750d5820@iki.fi> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Heikki! > Pushed 0001 as commit 6f5ad00ab7. > > I squashed 0002 and 0004 into one commit, and did some more refactoring: > I created a trigram_qsort() helper function that calls the signed or > unsigned variant, so that that logic doesn't need to be duplicated in > the callers. For symmetry, I also added a trigram_qunique() helper > function which just calls qunique() with the new, faster CMPTRGM_EQ > comparator. Pushed these as commit 9f3755ea07. Thanks for committing these patches. -- David Geier