Re: Vacuum thoughts - Mailing list pgsql-hackers

From Christopher Browne
Subject Re: Vacuum thoughts
Date
Msg-id m3vfqj1y8m.fsf@wolfe.cbbrowne.com
Whole thread Raw
In response to Vacuum thoughts  (Greg Stark <gsstark@mit.edu>)
Responses Re: Vacuum thoughts
List pgsql-hackers
The world rejoiced as tgl@sss.pgh.pa.us (Tom Lane) wrote:
> The latter point is really the crux of the problem.  The point of having
> the VACUUM process is to keep maintenance work out of the critical path
> of foreground queries.  Anything that moves even part of that
> maintenance work into the critical path is going to be a net loss.

How about a "flip side" for this...

VACUUM CACHE;

This new operation vacuums only those pages of relations that are in
cache.  Tuples that have recently been trashed are quite likely to be
in cache because they had to be drawn in in order to mark them as
obsolete.  So if there is (say) a "balance table" where entries get
updated regularly, the dead tuples should be sitting in cache.

This should go "blip - walk through 10K pages of cache in memory" and
be done.  (Modulo a need to pull in some index pages to mark index
entries as dead...)
-- 
output = reverse("gro.mca" "@" "enworbbc")
http://www.ntlug.org/~cbbrowne/linux.html
Build a man a fire and he will be warm for a day.
Set a man on fire and he will be warm for the rest of his life.


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: In-doubt window
Next
From: Peter Eisentraut
Date:
Subject: Re: Unicode upper() bug still present