pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix handling of NULL distances in KNN-GiST
7+ messages / 1 participants
[nested] [flat]

* pgsql: Fix handling of NULL distances in KNN-GiST
@ 2019-09-08 19:30  Alexander Korotkov <akorotkov@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Alexander Korotkov @ 2019-09-08 19:30 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix handling of NULL distances in KNN-GiST

In order to implement NULL LAST semantic GiST previously assumed distance to
the NULL value to be Inf.  However, our distance functions can return Inf and
NaN for non-null values.  In such cases, NULL LAST semantic appears to be
broken.  This commit fixes that by introducing separate array of null flags for
distances.

Backpatch to all supported versions.

Discussion: https://postgr.es/m/CAPpHfdsNvNdA0DBS%2BwMpFrgwT6C3-q50sFVGLSiuWnV3FqOJuQ%40mail.gmail.com
Author: Alexander Korotkov
Backpatch-through: 9.4

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/02f90879e75b3d4ccdba1ec7c3cad6af08dff77d

Modified Files
--------------
src/backend/access/gist/gistget.c          | 70 ++++++++++++++++++++----------
src/backend/access/gist/gistscan.c         | 25 +++++++++--
src/backend/access/index/indexam.c         | 14 ++++--
src/backend/access/spgist/spgscan.c        |  1 +
src/include/access/genam.h                 |  4 +-
src/include/access/gist_private.h          | 26 +++++++++--
src/test/regress/expected/create_index.out |  2 +-
7 files changed, 106 insertions(+), 36 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix handling of NULL distances in KNN-GiST
@ 2019-09-08 19:30  Alexander Korotkov <akorotkov@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Alexander Korotkov @ 2019-09-08 19:30 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix handling of NULL distances in KNN-GiST

In order to implement NULL LAST semantic GiST previously assumed distance to
the NULL value to be Inf.  However, our distance functions can return Inf and
NaN for non-null values.  In such cases, NULL LAST semantic appears to be
broken.  This commit fixes that by introducing separate array of null flags for
distances.

Backpatch to all supported versions.

Discussion: https://postgr.es/m/CAPpHfdsNvNdA0DBS%2BwMpFrgwT6C3-q50sFVGLSiuWnV3FqOJuQ%40mail.gmail.com
Author: Alexander Korotkov
Backpatch-through: 9.4

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e6af7b367cf46fc385307efcef5a1fece0e5fef3

Modified Files
--------------
src/backend/access/gist/gistget.c          | 70 ++++++++++++++++++++----------
src/backend/access/gist/gistscan.c         | 25 +++++++++--
src/backend/access/index/indexam.c         | 14 ++++--
src/backend/access/spgist/spgscan.c        |  1 +
src/include/access/genam.h                 |  4 +-
src/include/access/gist_private.h          | 26 +++++++++--
src/test/regress/expected/create_index.out |  2 +-
7 files changed, 106 insertions(+), 36 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix handling of NULL distances in KNN-GiST
@ 2019-09-08 19:30  Alexander Korotkov <akorotkov@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Alexander Korotkov @ 2019-09-08 19:30 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix handling of NULL distances in KNN-GiST

In order to implement NULL LAST semantic GiST previously assumed distance to
the NULL value to be Inf.  However, our distance functions can return Inf and
NaN for non-null values.  In such cases, NULL LAST semantic appears to be
broken.  This commit fixes that by introducing separate array of null flags for
distances.

Backpatch to all supported versions.

Discussion: https://postgr.es/m/CAPpHfdsNvNdA0DBS%2BwMpFrgwT6C3-q50sFVGLSiuWnV3FqOJuQ%40mail.gmail.com
Author: Alexander Korotkov
Backpatch-through: 9.4

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d807200b4a73a100cb8f41ee2f3ff1e2507647b8

Modified Files
--------------
src/backend/access/gist/gistget.c  | 77 +++++++++++++++++++++++++-------------
src/backend/access/gist/gistscan.c | 25 +++++++++++--
src/include/access/gist_private.h  | 26 +++++++++++--
3 files changed, 95 insertions(+), 33 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix handling of NULL distances in KNN-GiST
@ 2019-09-08 19:30  Alexander Korotkov <akorotkov@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Alexander Korotkov @ 2019-09-08 19:30 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix handling of NULL distances in KNN-GiST

In order to implement NULL LAST semantic GiST previously assumed distance to
the NULL value to be Inf.  However, our distance functions can return Inf and
NaN for non-null values.  In such cases, NULL LAST semantic appears to be
broken.  This commit fixes that by introducing separate array of null flags for
distances.

Backpatch to all supported versions.

Discussion: https://postgr.es/m/CAPpHfdsNvNdA0DBS%2BwMpFrgwT6C3-q50sFVGLSiuWnV3FqOJuQ%40mail.gmail.com
Author: Alexander Korotkov
Backpatch-through: 9.4

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/92f6b49c48a3b9c829d4117d59e89128455dbf5f

Modified Files
--------------
src/backend/access/gist/gistget.c  | 77 +++++++++++++++++++++++++-------------
src/backend/access/gist/gistscan.c | 25 +++++++++++--
src/include/access/gist_private.h  | 26 +++++++++++--
3 files changed, 95 insertions(+), 33 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix handling of NULL distances in KNN-GiST
@ 2019-09-08 19:31  Alexander Korotkov <akorotkov@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Alexander Korotkov @ 2019-09-08 19:31 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix handling of NULL distances in KNN-GiST

In order to implement NULL LAST semantic GiST previously assumed distance to
the NULL value to be Inf.  However, our distance functions can return Inf and
NaN for non-null values.  In such cases, NULL LAST semantic appears to be
broken.  This commit fixes that by introducing separate array of null flags for
distances.

Backpatch to all supported versions.

Discussion: https://postgr.es/m/CAPpHfdsNvNdA0DBS%2BwMpFrgwT6C3-q50sFVGLSiuWnV3FqOJuQ%40mail.gmail.com
Author: Alexander Korotkov
Backpatch-through: 9.4

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/a5431b7d5f6bcccd1fc69c4e4ae6e4d5f39b83f8

Modified Files
--------------
src/backend/access/gist/gistget.c  | 77 +++++++++++++++++++++++++-------------
src/backend/access/gist/gistscan.c | 25 +++++++++++--
src/include/access/gist_private.h  | 26 +++++++++++--
3 files changed, 95 insertions(+), 33 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix handling of NULL distances in KNN-GiST
@ 2019-09-08 19:31  Alexander Korotkov <akorotkov@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Alexander Korotkov @ 2019-09-08 19:31 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix handling of NULL distances in KNN-GiST

In order to implement NULL LAST semantic GiST previously assumed distance to
the NULL value to be Inf.  However, our distance functions can return Inf and
NaN for non-null values.  In such cases, NULL LAST semantic appears to be
broken.  This commit fixes that by introducing separate array of null flags for
distances.

Backpatch to all supported versions.

Discussion: https://postgr.es/m/CAPpHfdsNvNdA0DBS%2BwMpFrgwT6C3-q50sFVGLSiuWnV3FqOJuQ%40mail.gmail.com
Author: Alexander Korotkov
Backpatch-through: 9.4

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/3c155bafa59b26e0bb38b8e70b9034183c946d39

Modified Files
--------------
src/backend/access/gist/gistget.c  | 77 +++++++++++++++++++++++++-------------
src/backend/access/gist/gistscan.c | 25 +++++++++++--
src/include/access/gist_private.h  | 26 +++++++++++--
3 files changed, 95 insertions(+), 33 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix handling of NULL distances in KNN-GiST
@ 2019-09-08 19:31  Alexander Korotkov <akorotkov@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Alexander Korotkov @ 2019-09-08 19:31 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix handling of NULL distances in KNN-GiST

In order to implement NULL LAST semantic GiST previously assumed distance to
the NULL value to be Inf.  However, our distance functions can return Inf and
NaN for non-null values.  In such cases, NULL LAST semantic appears to be
broken.  This commit fixes that by introducing separate array of null flags for
distances.

Backpatch to all supported versions.

Discussion: https://postgr.es/m/CAPpHfdsNvNdA0DBS%2BwMpFrgwT6C3-q50sFVGLSiuWnV3FqOJuQ%40mail.gmail.com
Author: Alexander Korotkov
Backpatch-through: 9.4

Branch
------
REL9_4_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1df4123048c49dda878bbe3b49616b0ff3b3dbe5

Modified Files
--------------
src/backend/access/gist/gistget.c  | 70 +++++++++++++++++++++++++-------------
src/backend/access/gist/gistscan.c | 31 +++++++++++++----
src/include/access/gist_private.h  | 25 ++++++++++++--
3 files changed, 93 insertions(+), 33 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2019-09-08 19:31 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-09-08 19:30 pgsql: Fix handling of NULL distances in KNN-GiST Alexander Korotkov <akorotkov@postgresql.org>
2019-09-08 19:30 pgsql: Fix handling of NULL distances in KNN-GiST Alexander Korotkov <akorotkov@postgresql.org>
2019-09-08 19:30 pgsql: Fix handling of NULL distances in KNN-GiST Alexander Korotkov <akorotkov@postgresql.org>
2019-09-08 19:30 pgsql: Fix handling of NULL distances in KNN-GiST Alexander Korotkov <akorotkov@postgresql.org>
2019-09-08 19:31 pgsql: Fix handling of NULL distances in KNN-GiST Alexander Korotkov <akorotkov@postgresql.org>
2019-09-08 19:31 pgsql: Fix handling of NULL distances in KNN-GiST Alexander Korotkov <akorotkov@postgresql.org>
2019-09-08 19:31 pgsql: Fix handling of NULL distances in KNN-GiST Alexander Korotkov <akorotkov@postgresql.org>

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