Re: An out of memory error when doing a vacuum full

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sean Shanny <shannyconsulting(at)earthlink(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: An out of memory error when doing a vacuum full
Date: 2003-12-29 18:50:41
Message-ID: 16093.1072723841@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Sean Shanny <shannyconsulting(at)earthlink(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-12-29 19:04:04 Re: Out of memory error when doing an update with IN clause
Previous Message Andreas 2003-12-29 18:06:16 Re: simple auto-updating timestamp ?