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 1wCXmv-0025lG-0V for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Apr 2026 07:02:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wCXms-00AMtb-1L for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Apr 2026 07:02:19 +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 1wCXms-00AMtS-0Q for pgsql-hackers@lists.postgresql.org; Tue, 14 Apr 2026 07:02:19 +0000 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wCXmq-00000000ytB-3CBO for pgsql-hackers@postgresql.org; Tue, 14 Apr 2026 07:02:18 +0000 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-43cf7683a28so3450556f8f.2 for ; Tue, 14 Apr 2026 00:02:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776150134; x=1776754934; 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=StNZvXJu2HDbuDeuvBu72NA5UwpngRBkjXM5TjL6wHg=; b=iJfINB8TmqNR+MCOI88ziDoKfWN7dtC9FWFLJs8NLvodNd96PjfvkDEO/YwFL/Xw+V HeMH/OWEAxLryspeRSOP0E4vkz4bBh61uT5gb55PWQw5wcc11w4oKpTR2qT/MYU2L9p/ kO193drJfKOGIo5MtrnRnwhz1mCCz/drLxb5yYxDCJH/H4l2COChOPeYij7wYxultbNJ hwESCklUpqwz8FhtCHgVMco9/qpIRbjLgNaUy+nctJ9/jK6D6gcOumorAM4TxqSJeOS1 jmUNELLm5ORbKXBEuqMSje/LR2yoeSZV2cbaPtBsn8iBNlroZ2mttX1ji3QqoxR8Kz44 DYtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776150134; x=1776754934; 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=StNZvXJu2HDbuDeuvBu72NA5UwpngRBkjXM5TjL6wHg=; b=BK5BIZbSpqVynMBi+bD3kuvO+PogYa0Fkd4DEYQKvMqIh9PKm/mPOxQ9YqYbbLhe4u VnTFgxnwxRHaxzFh5rGd13jZG3zBOTWLluhVJp7Bh0ERDTIJQi+922Y++jl6BCwbFrp+ EbZ3QlX4SXOoXAjM3GQfFfrv7O1VugHBkEe4AsTAk1jtqHnP9VIAY59iiMZxb8QybtL9 DeHon5lj4ykffLycDKPuvUUaYRpXH/u4pe7991s7RncfMRQcESrG3w44xJoTLIlxvRs2 R2tSIWu3XkscadZWeeyYg3BQ225K/GES6KwH2+BQv6YI/pQJnfX7H+0YUFdNoY5Lusvp mUBQ== X-Forwarded-Encrypted: i=1; AFNElJ+MpbENmpZH2SucvKavwU+B7nNx7LyikFhqPGHQohfkaGJlCnJJDjoS/I2j402wnr9JlLmnr7OIeKTadR8/@postgresql.org X-Gm-Message-State: AOJu0Yzv2IZNeqAV9eAM93Y5xIXNEdau7iAZ3nmyhE0E5LBwF4HrL8jf EtfFY1FC+Fwm68eOGPj2lG9o7bp9Qc6j+BjrS5jjiR9UgxPeNwHFTIBk X-Gm-Gg: AeBDietFxs5jk2oPNnFs6Jb1YbeuDFX6rLM+RrXTlp3DmvUINLpk6zl73UcywG7yeMw L6MwbIVkvxacTQydB9YLyAqtpio9NTzd94E2Bh02KP6gluBrzakjE4OcqxrKzqLckl6/A/YrfXc mPCD/OUi6pKqRJPuavstrHaHCGVAlg7MArwLTVrE+SQtEjkZgjBbBshl5LctFs8R3Jf2xZ5iNoD JtHXzd1ZLsmIgMGkimOlBfd4DLcyOJqLZsyrH6Ws1FSCN5bjLHOBiXuslveSMnxMRfBQPtG0m9X sNMxFiRnPWMnbLzdThnAqN+fvkZjHUa4sokv+g0QhsPhU7v/gryTpB/dS08C5vsbbc1bV5y79J1 Idgyxz1g2RpFTKVXi6LVwO5BHtaY8VoNKjRelNh6sm2FemYsQLUrfIfvkppEN5gJh3XVVVVx92G Nx3SPuxMxnDXQuBJdh9Kv4Doec X-Received: by 2002:a05:6000:26cd:b0:43d:7b90:fa21 with SMTP id ffacd0b85a97d-43d7b90fc9fmr8267035f8f.12.1776150132963; Tue, 14 Apr 2026 00:02:12 -0700 (PDT) Received: from [172.31.5.233] ([165.225.27.16]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43d63e5c98fsm38624037f8f.35.2026.04.14.00.02.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Apr 2026 00:02:12 -0700 (PDT) Message-ID: <77cc23dd-ac53-4bb9-9e90-0019c9ff58df@gmail.com> Date: Tue, 14 Apr 2026 09:02:10 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Reduce build times of pg_trgm GIN indexes To: Heikki Linnakangas , Tom Lane Cc: 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> <342012.1776017102@sss.pgh.pa.us> <8f3fab0e-02e1-4948-9683-224fe54e30ae@iki.fi> Content-Language: en-US From: David Geier In-Reply-To: <8f3fab0e-02e1-4948-9683-224fe54e30ae@iki.fi> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > I didn't do it for performance, but because I find the function easier > to read that way. We could change it back. > > It's a pretty scary thought that a compiler might misoptimize that > though. In the same function we have 'nullFlags', too, as a local > variable, even before this commit. Not sure why Coverity doesn't > complain about that. > >> /* >>  * PointerGetDatum >>  *        Returns datum representation for a pointer. >>  */ >> static inline Datum >> PointerGetDatum(const void *X) >> { >>     return (Datum) (uintptr_t) X; >> } > > Hmm, is that 'const' incorrect? This function doesn't modify *X, but the > resulting address will be used to modify it. Maybe changing it to non- > const "void *X" would give Coverity a hint. Ah, that could be it. Is there a way for me to run Coverity on a patch to test that out? Which Coverity CI do we actually use? Is it this one here [1]? [1] https://scan.coverity.com/projects/209? -- David Geier