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-26 04:59:14
Message-ID: 20050726045914.GA5279@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Thu, Jul 14, 2005 at 10:52:56AM -0400, Tom Lane wrote:
> I've applied Alvaro's latest integrated-autovacuum patch. There are
> still a number of loose ends to be dealt with before beta, though:

Updated this patch:

- The stat collector is modified so as to keep shared relations separate
from regular ones. Autovacuum understands this.

- Temp tables are completely ignored.

- pg_statistic is ignored for analyze. It's still candidate for vacuum.

- databases with no stat entry are still ignored, except that they are
checked for Xid wraparound like any other. The "oldest" one is chosen
for vacuum in a particular autovacuum run.

- A database-wide vacuum forces a pg_database flat-file update, so that
the wraparound check actually works.

- The postmaster's main loop sleeps Min(60, autovacuum_naptime), in
order to be able to pick naptimes smaller than 60 seconds. In order
not to make the loop a busy-wait, I forced a minimum of 1 to that GUC
var. Yes, an argument could be made that the minimum could be higher.
Not sure if we actually want to dictate policy on this. The minimum
is there only to prevent the postmaster from using 100% of a CPU the
whole time.

- Tables with no stat entries are completely ignored.

- The stat collector ignores messages that relate to databases it
doesn't know about. This makes it inocuous to issue a database-wide
vacuum on a template database. A special case is made for database
InvalidOid -- an entry for it is created regardless.

Two comments still apply:

- I haven't done anything yet w.r.t. the custom vacuum_delay nor sleep
scale factor.

- There are still no docs.

--
Alvaro Herrera (<alvherre[a]alvh.no-ip.org>)
"Porque Kim no hacia nada, pero, eso sí,
con extraordinario éxito" ("Kim", Kipling)

Attachment Content-Type Size
autovac-two-2.patch text/plain 47.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Conway 2005-07-26 05:03:26 Re: User's exception plpgsql
Previous Message Pavel Stehule 2005-07-26 04:57:59 Re: User's exception plpgsql

Browse pgsql-patches by date

  From Date Subject
Next Message Neil Conway 2005-07-26 05:03:26 Re: User's exception plpgsql
Previous Message Pavel Stehule 2005-07-26 04:57:59 Re: User's exception plpgsql