[postgis-devel] Sparc 64bit problems

Stephen Campbell Stephen at me.massey.landcare.cri.nz
Fri Oct 14 21:53:28 PDT 2005


Hi strk,

[] One of your query doesn't involve GEOS, so I'd drop geos
[] as the first thing. This is the AsText(GeometryN()) query.
[] Would you try removing the AsText part so we're left
[] with the GeometryN and canonical output functions only ?


I noticed when I was running to do your queries that the behaviour is changing with a fresh psql client between the initial query and subsequent ones, mainly in causing the memory runaway but also note the very last one (which was in fact the very first run).

Note that this is on a running postgresql engine with the test db already in place.  It had, I think, last been used running an explain analyse verbose version of the OGC queries.

(Also GEOS seemed to run though its /source/test/'s ok.)

Cheers, Stephen.


======================================================================
Welcome to psql 8.0.4, the PostgreSQL interactive terminal.
...

spdb=# SELECT GeometryN(centerlines, 2) FROM divided_routes WHERE name = 'Route 75';
         geometryn          
----------------------------
 0020000002000048E700000000
(1 row)

spdb=# SELECT GeometryN(centerlines, 2) FROM divided_routes WHERE name = 'Route 75';
ERROR:  invalid memory alloc request size 1073741824
spdb=# \q

 -- the answer doesn't tally with the sparcv7 (32bit) one which
 -- is longer so I guess the AsText is correct, and the problem
 -- with it is just that its applied after the GeometryN and
 -- whatever its leaving messed up?


======================================================================
Welcome to psql 8.0.4, the PostgreSQL interactive terminal.
...

spdb=# SELECT ExteriorRing(shore) FROM lakes WHERE name = 'Blue Lake';
        exteriorring        
----------------------------
 0020000002000048E700000000
(1 row)

spdb=# SELECT ExteriorRing(shore) FROM lakes WHERE name = 'Blue Lake';
ERROR:  invalid memory alloc request size 1073741824
spdb=# SELECT ExteriorRing(shore) FROM lakes WHERE name = 'Blue Lake';
ERROR:  invalid memory alloc request size 1073741824
spdb=# \q


======================================================================
Welcome to psql 8.0.4, the PostgreSQL interactive terminal.
...

spdb=# SELECT AsText(Difference(named_places.boundary, forests.boundary)) FROM named_places, forests WHERE named_places.name = 'Ashton' AND forests.name = 'Green Forest';
ERROR:  invalid memory alloc request size 1073741824
spdb=# \q


======================================================================
Welcome to psql 8.0.4, the PostgreSQL interactive terminal.
...

spdb=# SELECT Difference(named_places.boundary, forests.boundary) FROM named_places, forests WHERE named_places.name = 'Ashton' AND forests.name = 'Green Forest';
         difference         
----------------------------
 0020000003000048E700000000
(1 row)

spdb=# SELECT Difference(named_places.boundary, forests.boundary) FROM named_places, forests WHERE named_places.name = 'Ashton' AND forests.name = 'Green Forest';
ERROR:  invalid memory alloc request size 1073741824
spdb=# \q


======================================================================
Welcome to psql 8.0.4, the PostgreSQL interactive terminal.
...

spc=# SELECT GeometryN(centerlines, 2) FROM divided_routes;
         geometryn          
----------------------------
 0020000002000048E700000000
(1 row)

spc=# SELECT GeometryN(centerlines, 2) FROM divided_routes;
ERROR:  invalid memory alloc request size 1073741824
spdb=# \q


======================================================================
Welcome to psql 8.0.4, the PostgreSQL interactive terminal.
...

spdb=# SELECT AsText(GeometryN(centerlines, 2))
spdb-# FROM divided_routes 
spdb-# WHERE name = 'Route 75';
SELECT AsText(GeometryN(centerlines, 2))
FROM divided_routes 
WHERE name = 'Route 75';
      astext      
------------------
 LINESTRING EMPTY
(1 row)

spdb=# SELECT AsText(GeometryN(centerlines, 2))
spdb-# FROM divided_routes 
spdb-# WHERE name = 'Route 75';
SELECT AsText(GeometryN(centerlines, 2))
FROM divided_routes 
WHERE name = 'Route 75';
         astext         
------------------------
 LINESTRING(16 0,16 23)
(1 row)

spdb=# SELECT AsText(GeometryN(centerlines, 2))
spdb-# FROM divided_routes 
spdb-# WHERE name = 'Route 75';
SELECT AsText(GeometryN(centerlines, 2))
FROM divided_routes 
WHERE name = 'Route 75';
         astext         
------------------------
 LINESTRING(16 0,16 23)
(1 row)




More information about the postgis-devel mailing list