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

From Andy Colson
Subject Re: Programming error: Out of Memory
Date
Msg-id 4CE300A2.9050001@squeakycode.net
Whole thread Raw
In response to Programming error: Out of Memory  (Jorge Arévalo <jorge.arevalo@deimos-space.com>)
Responses Re: Programming error: Out of Memory  (Jorge Arévalo <jorge.arevalo@deimos-space.com>)
List pgsql-general
On 11/16/2010 3:55 PM, Jorge Arévalo wrote:
> 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
>
>
>
>
>

Probably the OOM, google: postgres oom
there are lots and lots of pages about it.

-Andy

pgsql-general by date:

Previous
From: Andy Colson
Date:
Subject: Re: function problems
Next
From: Raymond O'Donnell
Date:
Subject: Re: function problems