Re: GiST operator class for bool - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: GiST operator class for bool
Date
Msg-id d28f4dd8-b1e4-fea5-a3a4-3661d73a9df8@enterprisedb.com
Whole thread Raw
In response to Re: GiST operator class for bool  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: GiST operator class for bool
List pgsql-hackers
Hi,

On 11/7/21 17:44, Tom Lane wrote:
> Tomas Vondra <tomas.vondra@enterprisedb.com> writes:
>> Pushed, after adding some simple EXPLAIN to the regression test.
> 
> skink is reporting that this has some valgrind issues [1].
> I suspect sloppy conversion between bool and Datum, but
> didn't go looking.
> 

It's actually a bit worse than that :-( The opclass is somewhat confused 
about the type it should use for storage. The gbtree_ninfo struct says 
it's using gbtreekey4, the SQL script claims the params are gbtreekey8, 
and it should actually use gbtreekey2. Sorry for not noticing that.

The attached patch fixes the valgrind error for me.


regards

-- 
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Predefined role pg_maintenance for VACUUM, ANALYZE, CHECKPOINT.
Next
From: Tomas Vondra
Date:
Subject: Re: Schema variables - new implementation for Postgres 15