From: | Andy Colson <andy(at)squeakycode(dot)net> |
---|---|
To: | Jorge Arévalo <jorge(dot)arevalo(at)deimos-space(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Programming error: Out of Memory |
Date: | 2010-11-16 22:07:30 |
Message-ID: | 4CE300A2.9050001@squeakycode.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Raymond O'Donnell | 2010-11-16 22:09:16 | Re: function problems |
Previous Message | Andy Colson | 2010-11-16 22:06:10 | Re: function problems |