[postgis-users] Backend crashes when collect()ing Box3ds

Ron Mayer rm_postgis at cheapcomplexdevices.com
Tue Oct 5 22:55:23 PDT 2004


If this mailinglist isn't the right place for such postings, let me know 
and I'll go elsewhere.


If I memcollect() or collect() BOX3Ds, sometimes I get a reasonable error 
message, but sometimes I get a crashed backend.  I know I shouldn't be 
doing this (collect()ing the envelope() is what I really wanted), but a 
crashed backend wasn't what I expected either, so I thought I'd mention 
it.



On SuSE 9, Postgresql 7.4.3, Postgis 0.8  
  I get the "server closed the connection unexpectedly", and
On Windows 2000, Postgresql 8.0.0.beta2, Postgis 0.8.2
  I get a hung psql client and apparently the backend vanished
  but I get no error message.


The easiest testcase I can come up with that shows the crash is
  select state,memcollect(bb) from (
      select state,box3d(the_geom)::box3d as bb
        from statesp020
       where state='California'
  ) as a group by state;
with the statesp020 table coming from this shapefile:
 http://edcftp.cr.usgs.gov/pub/data/nationalatlas/statesp020.tar.gz



Below are the results of a few such memcollect()s and

fl=# select memcollect(bb) from (select 'BOX3D(0 0, 1 1)'::box3d as bb) as a;
         memcollect
----------------------------
 SRID=-1;BOX3D(0 0 0,1 1 0)
(1 row)

fl=# select memcollect(bb) from (select 'BOX3D(0 0, 1 1)'::box3d as bb union select 'BOX3D(1 0, 1 1)'::box3d as bb) as a;
ERROR:  could not identify an ordering operator for type box3d
HINT:  Use an explicit ordering operator or modify the query.

fl=# select state,memcollect(bb) from (select state,box3d(the_geom)::box3d as bb from statesp020 where state='California') as a group by state;
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!>


> ########## more version info ###########
> fl=# -- [on the windows machine]
> fl=# select name,setting,postgis_full_version() from pg_settings where name = 'server_version';
>       name      |  setting   |                                        postgis_full_version                                         
> ----------------+------------+-----------------------------------------------------------------------------------------------------
>  server_version | 8.0.0beta2 | POSTGIS="0.8.2" GEOS="2.0.0" PROJ="Rel. 4.4.8, 3 May 2004" USE_STATS DBPROC="0.0.1" RELPROC="0.0.1"
> (1 row)
> 
> fl=# -- [on the SuSE machine (postgis_full_version doesn't exist)]
> fl=#  select name,setting,postgis_version() from pg_settings where name = 'server_version';
>       name      | setting |            postgis_version
> ----------------+---------+---------------------------------------
>  server_version | 7.4.3   | 0.8 USE_GEOS=1 USE_PROJ=1 USE_STATS=1



More information about the postgis-users mailing list