Re: autovacuum maintenance_work_mem

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: autovacuum maintenance_work_mem
Date: 2010-11-16 18:36:27
Message-ID: 4CE2CF2B.9090603@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11/16/10 9:27 AM, Robert Haas wrote:
> I'm a little skeptical about creating more memory tunables. DBAs who
> are used to previous versions of PG will find that their vacuum is now
> really slow, because they adjusted maintenance_work_mem but not this

Also, generally people who are using autovacuum don't do much manual
vacuuming, and when they do, it's easy enough to do a SET before you
issue the VACUUM statement.

So, -1 for yet another GUC.

> new parameter. If we could divide up the vacuum memory intelligently
> between the workers in some way, that would be a win. But just
> creating a different variable that controls the same thing in
> different units doesn't seem to add much.

Actually, that's not unreasonable. The difficulty with allocating
work_mem out of a pool involves concurrency, but use of maint_work_mem
is very low-concurrency; it wouldn't be that challenging to have the
autovac workers pull from a pool of preset size instead of each being
allocated the full maint_work_mem. And that would help with over/under
allocation of memory.

--
-- Josh Berkus
PostgreSQL Experts Inc.
http://www.pgexperts.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-11-16 18:39:46 Re: autovacuum maintenance_work_mem
Previous Message Robert Haas 2010-11-16 18:36:16 Re: Extensible executor nodes for preparation of SQL/MED