Re: GiST operator class for bool

From: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, emre(at)hasegeli(dot)com, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: GiST operator class for bool
Date: 2021-11-07 19:53:21
Message-ID: d28f4dd8-b1e4-fea5-a3a4-3661d73a9df8@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 11/7/21 17:44, Tom Lane wrote:
> Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)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 Content-Type Size
btree_gist-bool-fix.patch text/x-patch 2.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2021-11-07 21:14:00 Re: Schema variables - new implementation for Postgres 15
Previous Message Justin Pryzby 2021-11-07 19:22:00 Re: pg_upgrade test for binary compatibility of core data types