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 1wFerW-005PH2-2i for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Apr 2026 21:11:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wFerV-00FNfm-0G for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Apr 2026 21:11:57 +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 1wFerU-00FNfW-2X for pgsql-hackers@lists.postgresql.org; Wed, 22 Apr 2026 21:11:56 +0000 Received: from meesny.iki.fi ([2001:67c:2b0:1c1::201]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wFerS-00000002XGO-3QtK for pgsql-hackers@postgresql.org; Wed, 22 Apr 2026 21:11:56 +0000 Received: from [10.0.2.15] (unknown [137.83.235.84]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: hlinnaka) by meesny.iki.fi (Postfix) with ESMTPSA id 4g1Bk02WT4zyQm; Thu, 23 Apr 2026 00:11:52 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1776892313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eATLNM50cAWvMfrP/X+t9mCL+4wlYY/CGW5JFb16mj8=; b=Jw5puMP8BlCCYR6ksZYdFYxM4PSKDGHK4+IgjvcKWwno+q66ctkIRD7L8qxpd0bwgCyuyQ 0NlTy82njseeP8Z9w2fwnVsWRpMDNdgijr/6v4unPs6bS77+0Zc5jx9wkQTLFyh1YMiaPw Poluq5oDvjWjOAX2cN7BTtFjnMEc+ug= ARC-Seal: i=1; a=rsa-sha256; d=iki.fi; s=meesny; cv=none; t=1776892313; b=xj8hEG93HnEPjQPAdqlE1/41HC44GwvdUhjuSReHhxUNRSuDBCjsDLsRGCdrnhn/wijfCN t1GQ0YfrZKoxoJQGNLU0Whs93yOTvZQaA6S2t3NnR7RFeinK7Ly4K4pcce2dB5JbMOfbpH JjcDZYiqlBC68z3DMFHql3Zea+LP1E8= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=hlinnaka smtp.mailfrom=hlinnaka@iki.fi ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1776892313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eATLNM50cAWvMfrP/X+t9mCL+4wlYY/CGW5JFb16mj8=; b=nMsMI6NNlRyrwqZMzn9Kl6KF2Y3FM7aQOb7ZcX5QiTtCCyDHe6QjhT7OZIbj0PLot0Qj8a 2ZT4ClDzJDUVZWSiSdDZ7fWWTALnEV/0h/SO+AM0X7yEbidHlHRTU/g96cfuWQpNavZyd7 SoQdMoFAbT+Flx9uY5BVlcaSaG4AQ+k= Message-ID: <1586347e-2afd-4268-9a6e-03e0b6f8c788@iki.fi> Date: Thu, 23 Apr 2026 00:11:51 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Reduce build times of pg_trgm GIN indexes From: Heikki Linnakangas To: Tom Lane , Peter Eisentraut , pgsql-hackers , David Geier References: <5d366878-2007-4d31-861e-19294b7a583b@gmail.com> <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> <342012.1776017102@sss.pgh.pa.us> <8f3fab0e-02e1-4948-9683-224fe54e30ae@iki.fi> <77cc23dd-ac53-4bb9-9e90-0019c9ff58df@gmail.com> <195097d6-64cd-4adb-b8a3-1d86ae31c411@iki.fi> <2197023.1776288324@sss.pgh.pa.us> <4c1f88d7-5102-45b3-94e3-86d7e4b46b0a@eisentraut.org> <99ce20a5-793a-4182-9120-f274fbef9bfd@iki.fi> <2340004.1776350271@sss.pgh.pa.us> <37ce5cce-66ca-4216-ae88-af39c444042d@iki.fi> <2438252.1776361625@sss.pgh.pa.us> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 17/04/2026 22:21, Heikki Linnakangas wrote: > On 16/04/2026 20:47, Tom Lane wrote: >> Heikki Linnakangas writes: >>> On 16/04/2026 17:37, Tom Lane wrote: >>>> Not excited about making massive changes for this. >> >>> Having all three would be a very localized change in postgres.h. >> >> Sure, but *using* them in a consistent way would be invasive. >> >>>> I remain far less certain than Peter is that this discussion has >>>> anything to do with why Coverity is complaining about >>>> ginExtractEntries.  I still think we should make some minimum-effort >>>> change to see if the complaint goes away before expending a lot of >>>> brain cells on choosing a final fix. >> >>> I think I'm going to commit my proposal to turn PointerGetDatum() back >>> into a macro, and see if that makes Coverity happy. Then we'll know, and >>> we can decide on the next steps. Any objections? >> >> WFM. > > ... > > So, pushed a commit that changes just PointerGetDatum() itself, leaving > all those others alone. As we thought, this made the Coverity warning go away. I'm happy with the status quo in master, but if we want to introduce new ConstPointerGetDatum() or NonConstPointerGetDatum() variants instead of the macro, now is the time to do it. For backbranches, IMHO we should go with the macro. It's a little scary to replace such a widely used function as PointerGetDatum() in back-branches, but I do think this should be fixed. Introducing new variants doesn't seems even less backpatchable. - Heikki