From: | Tilo Schwarz <list(at)tilo-schwarz(dot)de> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | ERROR: Memory exhausted in AllocSetAlloc(188) |
Date: | 2003-07-16 18:32:49 |
Message-ID: | 200307162032.49232.list@tilo-schwarz.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Dear Postgresql gurus,
some time ago I sent a mail to pgsql-general(at)postgresql(dot)org(dot) For some magic
reason, I couldn't find it in the archives, so I repeat the main point below:
I wrote:
[...snip...]
I have a problem (7.3.1 on linux) with a query eating all my memory.
[...snip...]
tschwarz=# select * from feature_point_delta_avg where sequence_id
=325058;
(waiting for ca. 10 minutes)
ERROR: Memory exhausted in AllocSetAlloc(188)
Tom replied:
You didn't tell us much about the functions involved in these views,
but I suspect the problem has to do with the fact that you're passing
whole-row references (foo.*) to the functions. The mechanism for
handling whole-row references is horrid --- it leaks memory that isn't
reclaimed till end of query. We need to redesign it someday. In the
meantime, try passing just the columns you need, explicitly.
Now I had time to verify this - and Tom was right. After passing the columns
explicitly, the problem disappears. Because I need > 20 columns in my
function, the code (using $1 ... $20) becomes pretty ugly, so I'm happy to
see this point on the TODO ;-)
Thanks a lot for helping!
Tilo
From | Date | Subject | |
---|---|---|---|
Next Message | Leon Oosterwijk | 2003-07-16 18:33:35 | Re: Postgresql "FIFO" Tables, How-To ? |
Previous Message | Dennis Gearon | 2003-07-16 18:13:48 | Re: Postgresql "FIFO" Tables, How-To ? |