[postgis-tickets] [PostGIS] #3131: KNN geography still gives ERROR: index returned tuples in wrong order

PostGIS trac at osgeo.org
Fri May 29 15:38:07 PDT 2015


#3131: KNN geography still gives  ERROR:  index returned tuples in wrong order
----------------------+---------------------------
  Reporter:  robe     |      Owner:  pramsey
      Type:  defect   |     Status:  new
  Priority:  blocker  |  Milestone:  PostGIS 2.2.0
 Component:  postgis  |    Version:  trunk
Resolution:           |   Keywords:
----------------------+---------------------------

Comment (by robe):

 I'll take another backtrace after I'm done rebuilding postgres, but this
 is what I have from weekold postgresql 9.5 after recent postgis install:
 running this query -

 {{{

 SELECT gid, RANK() OVER(ORDER BY ST_Distance( 'POINT(95 10)'::geography,
 geog) )
 FROM knn_recheck_geog
 ORDER BY 'POINT(95 10)'::geography <-> geog LIMIT 5;
 }}}



 {{{
 Program received signal SIGSEGV, Segmentation fault.
 [Switching to Thread 12180.0x2e10]
 0x00000000708a3324 in geography_distance_uncached
 (fcinfo=fcinfo at entry=0x273e670) at geography_measurement.c:86
 86                      tolerance = PG_GETARG_FLOAT8(2);
 (gdb) bt
 #0  0x00000000708a3324 in geography_distance_uncached
 (fcinfo=fcinfo at entry=0x273e670) at geography_measurement.c:86
 #1  0x0000000000782ebf in DirectFunctionCall3Coll
 (func=func at entry=0x708a3200 <geography_distance_uncached>,
 collation=collation at entry=0, arg1=<optimized out>, arg2=<optimized out>,
 arg3=arg3 at entry=0) at fmgr.c:1074
 #2  0x00000000708a33f3 in geography_distance_knn (fcinfo=<optimized out>)
 at geography_measurement.c:58
 #3  0x000000000057c15b in ExecMakeFunctionResultNoSets (fcache=0x4b5e820,
 econtext=0x4b5e0c0, isNull=0x4c380da "", isDone=<optimized out>) at
 execQual.c:2018
 #4  0x00000000005820c0 in ExecTargetList (isDone=0x273ebfc,
 itemIsDone=0x4c38270, isnull=0x4c380d8 "", values=0x4c380a0,
 econtext=0x4b5e0c0, targetlist=0x4c38210) at execQual.c:5363
 #5  ExecProject (projInfo=<optimized out>, isDone=isDone at entry=0x273ebfc)
 at execQual.c:5578
 #6  0x000000000059eb33 in ExecWindowAgg
 (winstate=winstate at entry=0x4b5dde8) at nodeWindowAgg.c:1746
 #7  0x000000000057b0b8 in ExecProcNode (node=node at entry=0x4b5dde8) at
 execProcnode.c:500
 #8  0x0000000000598459 in ExecSort (node=node at entry=0x4b5db50) at
 nodeSort.c:103
 #9  0x000000000057b028 in ExecProcNode (node=node at entry=0x4b5db50) at
 execProcnode.c:488
 #10 0x0000000000590d90 in ExecLimit (node=node at entry=0x4b5d810) at
 nodeLimit.c:91
 #11 0x000000000057aed8 in ExecProcNode (node=node at entry=0x4b5d810) at
 execProcnode.c:520
 #12 0x0000000000577c7e in ExecutePlan (dest=0x4c30398,
 direction=<optimized out>, numberTuples=0, sendTuples=1 '\001',
 operation=CMD_SELECT, planstate=0x4b5d810, estate=0x4b5d6f8) at
 execMain.c:1549
 #13 standard_ExecutorRun (queryDesc=0x4b49728, direction=<optimized out>,
 count=0) at execMain.c:337
 #14 0x000000000068bd58 in PortalRunSelect (portal=portal at entry=0x4b51698,
 forward=forward at entry=1 '\001', count=0, count at entry=41153104,
 dest=dest at entry=0x0) at pquery.c:946
 #15 0x000000000068d356 in PortalRun (portal=0x273eeb0,
 portal at entry=0x4b51698, count=41153104, count at entry=2147483647,
 isTopLevel=isTopLevel at entry=0 '\000', dest=0x0, dest at entry=0x4c30398,
 altdest=altdest at entry=0x4c30398, compl
 #16 0x000000000068ac54 in exec_simple_query (query_string=0x0) at
 postgres.c:1104
 #17 PostgresMain (argc=<optimized out>, argv=argv at entry=0x2a81a8,
 dbname=0x10000f000e000d <error: Cannot access memory at address
 0x10000f000e000d>, username=<optimized out>) at postgres.c:4025
 #18 0x000000000062ac03 in BackendRun (port=0x273f400) at postmaster.c:4162
 #19 SubPostmasterMain (argc=argc at entry=3, argv=argv at entry=0x317fa0) at
 postmaster.c:4649
 #20 0x00000000007c6b60 in main (argc=3, argv=0x317fa0) at main.c:198
 }}}

--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/3131#comment:3>
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