[postgis-tickets] [PostGIS] #5032: ST_EstimatedExtent gives bogus results on combined gist indexes
PostGIS
trac at osgeo.org
Fri Dec 10 12:32:23 PST 2021
#5032: ST_EstimatedExtent gives bogus results on combined gist indexes
-----------------------------+---------------------------
Reporter: Björn Harrtell | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 3.2.0
Component: postgis | Version: master
Resolution: | Keywords:
-----------------------------+---------------------------
Description changed by Björn Harrtell:
Old description:
> Reproduction:
>
> {{{
> drop table test;
> with vals(k, geom) as (values (1, 'POINT(1 1)'::geometry), (2, 'POINT(1
> 2)'::geometry))
> select * into table test from vals;
> analyze test;
> select st_estimatedextent('test', 'geom');
> -- BOX(1 0.995000004768372,1 2.005000114440918)
> create index test_geom_idx on test using gist (geom);
> select st_estimatedextent('test', 'geom');
> -- BOX(1 1,1 2)
> drop index test_geom_idx;
> create index test_k_geom_idx on test using gist (k, geom);
> select st_estimatedextent('test', 'geom');
> -- BOX(1.401298464324817E-45 1,2.802596928649634E-45 1)
> }}}
>
> This is on:
>
> POSTGIS="3.2.0dev 3.2.0beta2-11-g27f44ecf6" [EXTENSION] PGSQL="120"
> GEOS="3.9.0-CAPI-1.16.2" PROJ="7.2.1" LIBXML="2.9.12" LIBJSON="0.15"
> (core procs from "3.2.0dev 3.2.0beta2-3-geda70258f" need upgrade)
>
> But I think it's an old bug.
New description:
Reproduction:
{{{
drop table if exists test;
with vals(k, geom) as (values (1, 'POINT(1 1)'::geometry), (2, 'POINT(1
2)'::geometry))
select * into table test from vals;
analyze test;
select st_estimatedextent('test', 'geom');
-- BOX(1 0.995000004768372,1 2.005000114440918)
create index test_geom_idx on test using gist (geom);
select st_estimatedextent('test', 'geom');
-- BOX(1 1,1 2)
drop index test_geom_idx;
create index test_k_geom_idx on test using gist (k, geom);
select st_estimatedextent('test', 'geom');
-- BOX(1.401298464324817E-45 1,2.802596928649634E-45 1)
}}}
This is on:
POSTGIS="3.2.0dev 3.2.0beta2-11-g27f44ecf6" [EXTENSION] PGSQL="120"
GEOS="3.9.0-CAPI-1.16.2" PROJ="7.2.1" LIBXML="2.9.12" LIBJSON="0.15" (core
procs from "3.2.0dev 3.2.0beta2-3-geda70258f" need upgrade)
But I think it's an old bug.
--
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5032#comment:1>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list