Programming error: Out of Memory - Mailing list pgsql-general

From Jorge Arévalo
Subject Programming error: Out of Memory
Date
Msg-id AANLkTimjGa_pb4_iuU1s-Xqxm=_JzoaOsZgCjzkiTPxZ@mail.gmail.com
Whole thread Raw
Responses Re: Programming error: Out of Memory
Re: Programming error: Out of Memory
List pgsql-general
Hello,

I'm getting an error message in my Python script:

pg.ProgrammingError: ERROR:  out of memory
DETAIL:  Failed on request of size 16.

The query that caused the error was:

UPDATE table1 SET string = (SELECT string FROM table2 WHERE
ST_Centroid(table1.wkb_geometry) && table2. the_geom AND
(ST_Distance(ST_Centroid(table1.wkb_geometry), table2.the_geom)<=0)
LIMIT 1 OFFSET 0) WHERE string is null;

table1: a table with one geometry column of type "polygon" (square
polygons). 1277500 rows.
table2: a table with one geometry column of type "polygon". A few rows (12).

Both geometry columns have gist indexes over them.

This query was executed inside a loop, with another 10 similar
queries, using table1 against different tables (table2, table3,
table4, etc). The error is not always produced in the same part of the
loop (sometimes with table2, sometimes with table3...). I attach the
relevant part of PostgreSQL log.

My enviroment: Ubuntu 10.10, PostgreSQL 8.4, PostGIS 1.5.2, 2GB RAM
Things I've tried: Increase the SHMMAX kernel variable from 32MB to
128MB. Increase SHMALL too. Change postgresql.conf parameters
shared_buffers to 120MB, work_mem to 32MB, effective_cache_size to
128MB. Didn't work.

I think it's a problem with data, because I've tested this other times
with other data at worked. What could be happening?

Many thanks in advance

--
Jorge Arévalo
Internet & Mobilty Division, DEIMOS
jorge.arevalo@deimos-space.com
http://mobility.grupodeimos.com/
http://gis4free.wordpress.com

Attachment

pgsql-general by date:

Previous
From: Christine Penner
Date:
Subject: Re: function problems
Next
From: Andy Colson
Date:
Subject: Re: function problems