Re: An out of memory error when doing a vacuum full - Mailing list pgsql-general

From Tom Lane
Subject Re: An out of memory error when doing a vacuum full
Date
Msg-id 16093.1072723841@sss.pgh.pa.us
Whole thread Raw
In response to Re: An out of memory error when doing a vacuum full  (Sean Shanny <shannyconsulting@earthlink.net>)
Responses Re: An out of memory error when doing a vacuum full
List pgsql-general
Sean Shanny <shannyconsulting@earthlink.net> writes:
> sort_mem = 64000                # min 64, size in KB

You might want to lower that; a complex query could easily use several
times sort_mem.  Whether this is the immediate source of your problem
with the other query is hard to tell.

> vacuum_mem = 32767              # min 1024, size in KB

That seems all right, but I recollect now that it only applies to plain
VACUUM not VACUUM FULL.  VACUUM FULL needs to keep track of *all* the
free space in a table, and so it's certainly possible that vacuuming a
huge table with many dead tuples could require lots of memory.  I can't
recall anyone else ever complaining about VACUUM FULL running out of
memory, though, so there may be some other contributing factor in your
situation.  Too bad you reloaded the table --- it would be interesting
to see if increasing your 512Mb datasize ulimit would have allowed the
VACUUM FULL to complete.  (Not but what it would've taken forever :-()

            regards, tom lane

pgsql-general by date:

Previous
From: Andreas
Date:
Subject: Re: simple auto-updating timestamp ?
Next
From: Tom Lane
Date:
Subject: Re: Out of memory error when doing an update with IN clause