Re: Out of Memory - 8.2.4 - Mailing list pgsql-general

From Tom Lane
Subject Re: Out of Memory - 8.2.4
Date
Msg-id 1870.1188489370@sss.pgh.pa.us
Whole thread Raw
In response to Re: Out of Memory - 8.2.4  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: Out of Memory - 8.2.4  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-general
Alvaro Herrera <alvherre@commandprompt.com> writes:
>> VACUUM getting "Out of memory" may not sound like a big problem, but
>> the scary thing is - the last VACUUM's memory request may succeed and
>> that means following queries start failing and that is big problem.

> Maybe what we should do is spill the TID list to disk instead.  TODO for
> 8.4?

I'm inclined to think that that'd be counterproductive.  Searching the
TID list has to be *fast*, else the index cleanup scans will take
forever.  It's probably better to have a smaller list and do two index
passes than to try to do it in one pass using a list that doesn't fit in
memory --- in the former case you're at least doing a seqscan of the
index, rather than randomly faulting in different parts of the TID list.

It's fairly likely that 512MB is already too high and is causing some
swapping on the OP's machine ...

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: rules and rows affected
Next
From: Tom Lane
Date:
Subject: Re: why does a system catalog insert/update/delete not fire a trigger?