Re: [HACKERS] Autovacuum loose ends

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net>, pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] Autovacuum loose ends
Date: 2005-07-31 23:36:36
Message-ID: 20050731233636.GA18237@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Here is another patch for autovacuum:

- vacuum_cost_delay and vacuum_cost_limit can be set per table, as well
as globally with autovacuum_vacuum_cost_{limit,delay}

- pgstat is reset if recovery is required

- pgstat reset at postmaster start is disabled by default

- Xid-wraparound VACUUM is now FULL without ANALYZE

Note that because of the cost parameters, I changed the vacuum call in a
per-table call instead of passing a list of Oids. This could be changed
by having two separate lists, one which uses the default values and
other for the rest, but it hardly seems worth the trouble.

(This patch requires catversion bump.)

On Sun, Jul 31, 2005 at 03:15:35PM -0400, Tom Lane wrote:

> BTW, it strikes me that there is one serious error in the current
> autovac logic: it does VACUUM ANALYZE rather than merely VACUUM
> when doing XID-wrap protection. This means that it actively introduces
> unfrozen tuples into template databases, which is A Bad Move. We
> should just VACUUM, instead.

True. Changed in the attached patch.

I think this completes our expectations for 8.1, doesn't it? Now we
only need the documentation.

--
Alvaro Herrera (<alvherre[a]alvh.no-ip.org>)
"I call it GNU/Linux. Except the GNU/ is silent." (Ben Reiter)

Attachment Content-Type Size
autovac-three-1.patch text/plain 19.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2005-08-01 00:33:32 Re: Remote administration functionality
Previous Message Tom Lane 2005-07-31 19:15:35 Re: [HACKERS] Autovacuum loose ends

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2005-08-01 02:26:27 Re: [HACKERS] For review: Server instrumentation patch
Previous Message Tom Lane 2005-07-31 19:15:35 Re: [HACKERS] Autovacuum loose ends