Re: Vacuum running out of memory

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Jonathan Foy <thefoy(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Vacuum running out of memory
Date: 2009-12-08 16:41:13
Message-ID: 407d949e0912080841x48d3377l245a65b7f389c85b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Tue, Dec 8, 2009 at 4:31 PM, Jonathan Foy <thefoy(at)gmail(dot)com> wrote:
> I was wondering if that was the problem.  So I'm correct in thinking that
> the failure occurred when the vacuum tried to pull its 256 MB as defined in
> the maintenance_work_mem value, and the system just did not have enough
> available...

Correct

> any idea why that would suddenly start happening?  The indexes I
> created shouldn't have affected that, should they?

Well the 8.1 vacuum was pretty inefficient in how it scanned indexes
so adding lots of indexes will make it take a lot longer. That might
mean you're running more vacuums at the same time now. The 8.2 vacuum
is much improved on that front, though adding lots of indexes will
still make vacuum take longer (along with updates and inserts).

> And point taken with the update.  I'm pushing to get us to 8.4,
> unsuccessfully so far, but management might be more amenable to minor
> version upgrades, since as I understand it there shouldn't be any risk of
> application problems with minor version changes...

You're always better off running the most recent minor release. Minor
releases fix security holes, data corruption bugs, crashing bugs, etc.
Occasionally those bugs do fix behavioural bugs, especially early in
the release cycle before the next major release is out but mostly
they're real bugs that if you had run into you would know. You should
still read all the release notes for them though.

--
greg

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2009-12-08 16:42:43 Re: Vacuum running out of memory
Previous Message Jonathan Foy 2009-12-08 16:31:04 Re: Vacuum running out of memory