Re: [HACKERS] Autovacuum loose ends - Mailing list pgsql-patches

From Alvaro Herrera
Subject Re: [HACKERS] Autovacuum loose ends
Date
Msg-id 20050726045914.GA5279@alvh.no-ip.org
Whole thread Raw
Responses Re: [HACKERS] Autovacuum loose ends
Re: [HACKERS] Autovacuum loose ends
Re: [HACKERS] Autovacuum loose ends
List 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

pgsql-patches by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: User's exception plpgsql
Next
From: Neil Conway
Date:
Subject: Re: User's exception plpgsql