From: Alexander Korotkov <akorotkov@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix handling Inf and Nan values in GiST pairing heap comparator
Date: Sun, 08 Sep 2019 19:31:06 +0000
Message-ID: <E1i72tu-0001S9-DW@gemulon.postgresql.org> (raw)
Fix handling Inf and Nan values in GiST pairing heap comparator
Previously plain float comparison was used in GiST pairing heap. Such
comparison doesn't provide proper ordering for value sets containing Inf and Nan
values. This commit fixes that by usage of float8_cmp_internal(). Note, there
is remaining problem with NULL distances, which are represented as Inf in
pairing heap. It would be fixes in subsequent commit.
Backpatch to all supported versions.
Reported-by: Andrey Borodin
Discussion: https://postgr.es/m/CAPpHfdsNvNdA0DBS%2BwMpFrgwT6C3-q50sFVGLSiuWnV3FqOJuQ%40mail.gmail.com
Author: Alexander Korotkov
Reviewed-by: Heikki Linnakangas
Backpatch-through: 9.4
Branch
------
REL9_5_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/986319d467cfefaa54b5cb72e063e28b66f04d42
Modified Files
--------------
src/backend/access/gist/gistscan.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: akorotkov@postgresql.org
Subject: Re: pgsql: Fix handling Inf and Nan values in GiST pairing heap comparator
In-Reply-To: <E1i72tu-0001S9-DW@gemulon.postgresql.org>
References: <E1i72tu-0001S9-DW@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox