Bug#908731: postgis: Normal query can fail with "index returned tuples in wrong order" error

Matthew Somerville matthew at mysociety.org
Thu Sep 13 09:19:47 BST 2018


Package: postgis
Version: 2.3.1+dfsg-2
Severity: normal
Tags: upstream

Dear Maintainer,

Version 2.3.1 of postgis has a bug whereby geometry queries can sometimes fail.
For example:

mapit=# create table test (geo geometry);
CREATE TABLE
mapit=# insert into test values 
mapit-# ('0101000020E61000007D91D0967329E4BF6631B1F9B8D64A40'::geometry), 
mapit-# ('0101000020E6100000E2AFC91AF510C1BFCDCCCCCCCCAC4A40'::geometry);
INSERT 0 2
mapit=# create index on test using gist (geo);
CREATE INDEX
mapit=# vacuum analyze test;
VACUUM
mapit=# set enable_seqscan = false;
SET
mapit=# select * from test ORDER BY geo::geometry <->
mapit-# ('0101000020E610000092054CE0D6DDE5BFCDCCCCCCCCAC4A40'::geometry);
ERROR:  index returned tuples in wrong order
mapit=# drop table test;
DROP TABLE
mapit=# 

This was reported upstream at: https://trac.osgeo.org/postgis/ticket/3418
And fixed in postgis 2.3.2, the 2.3 commit fixing it is here:
https://trac.osgeo.org/postgis/changeset/15285

Is there any chance this could be included/backported to fix the issue
in stretch?

ATB,
Matthew

-- System Information:
Debian Release: 9.5
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-8-amd64 (SMP w/28 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages postgis depends on:
ii  libc6            2.24-11+deb9u3
ii  libgdal20        2.1.2+dfsg-5
ii  libgeos-c1v5     3.5.1-3
ii  liblwgeom-2.3-0  2.3.1+dfsg-2
ii  libpq5           9.6.10-0+deb9u1

Versions of packages postgis recommends:
ii  postgis-doc                 2.3.1+dfsg-2
ii  postgresql-9.6-postgis-2.3  2.3.1+dfsg-2

Versions of packages postgis suggests:
pn  postgis-gui  <none>

-- no debconf information



More information about the Pkg-grass-devel mailing list