Re: [PATCH]Remove obsolete macro CHECKFLOATVAL in btree_gist - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [PATCH]Remove obsolete macro CHECKFLOATVAL in btree_gist
Date
Msg-id YRxchDHrEEClniKm@paquier.xyz
Whole thread Raw
In response to RE: [PATCH]Remove obsolete macro CHECKFLOATVAL in btree_gist  ("tanghy.fnst@fujitsu.com" <tanghy.fnst@fujitsu.com>)
Responses Re: [PATCH]Remove obsolete macro CHECKFLOATVAL in btree_gist  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On Tue, Aug 17, 2021 at 11:08:59AM +0000, tanghy.fnst@fujitsu.com wrote:
> On Friday, August 6, 2021 11:14 PM, tanghy.fnst@fujitsu.com <tanghy.fnst@fujitsu.com> wrote:
>> Commit 6bf0bc842 replaced float.c's CHECKFLOATVAL() macro with static inline subroutines,
>> but the fix introduced a performance regression as Tom Lane pointed out and fixed at 607f8ce74.
>>
>> Found obsolete CHECKFLOATVAL usage in contrib/btree_gist, and tried to fix it according to 607f8ce74.
>
> Added above patch in commit fest:
> https://commitfest.postgresql.org/34/3287/

Yes, that does not seem wise on performance grounds.  The case of
!zero_is_valid is never reached, so it seems like this code was just a
copy-paste from the float code in the backend.  Your patch looks right
to me.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Two patches to speed up pg_rewind.
Next
From: "houzj.fnst@fujitsu.com"
Date:
Subject: RE: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o