mwrynn@gmail.com writes:
> Tom, below is the information you requested.
Well, the table definitions look ordinary enough, but this is odd:
> SPI Exec: 528474160 total in 69 blocks; 309634880 free (9674592
> chunks); 218839280 used
Something's leaking a lot of memory within a SPI call, which means
either a plpgsql-invoked query or a SPI_execute-or-sibling call
from a C-language function. I can see from the memory dump that
you're using some of both, but no details beyond that. Also,
it seems the actual failure is not coming from CLUSTER at all,
but during an attempt to report a message via RAISE:
> <2006-12-13 14:41:46 EST>ERROR: out of memory
> <2006-12-13 14:41:46 EST>DETAIL: Failed on request of size 20.
> <2006-12-13 14:41:46 EST>CONTEXT: SQL statement "SELECT $1 [ $2 ]"
> PL/pgSQL function "cluster_load_tables" line 31 at raise
So I think you're gonna have to show us the functions you're using ...
regards, tom lane