Re: Auto Vacuum - Mailing list pgsql-hackers

From Christopher Browne
Subject Re: Auto Vacuum
Date
Msg-id m3zn10rnd5.fsf@knuth.knuth.cbbrowne.com
Whole thread Raw
In response to Re: Auto Vacuum  ("Matthew T. O'Connor" <matthew@zeut.net>)
List pgsql-hackers
Oops! pgman@candle.pha.pa.us (Bruce Momjian) was seen spray-painting on a wall:
> That could be part of auto-vacuum.  Vacuum itself would still
> sequential scan, I think.  The idea is to easily grab expire tuples
> when they are most cheaply found.

The nifty handling of this would be to introduce "VACUUM CACHE", which
would simply walk through the shared memory cache to look for expiries
there.  

That could have a most interesting interaction with ARC...

On the "unfortunate" side, marking tuples as dead would, I believe
draw in some index pages.  (Right?)  

Those pages drawn in would remain at the "cheapest" end of the cache;
an ARC 'win.'  And it should be the case that this ultimately shrinks
cache usage, as dead tuples get thrown out.

Running VACUUM CACHE periodically on a system that is "killing" tuples
at a pretty steady clip ought to clear out many of those tuples
without needing to browse the tables.  

This ought to be particularly helpful with large tables that have
small "contentious" portions that generate dead tuples.
-- 
let name="cbbrowne" and tld="gmail.com" in name ^ "@" ^ tld;;
http://www.ntlug.org/~cbbrowne/rdbms.html
"Heuristics (from the  French heure, "hour") limit the  amount of time
spent executing something.  [When using heuristics] it shouldn't take
longer than an hour to do something."


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Error: column "nsptablespace" does not exist
Next
From: Greg Stark
Date:
Subject: Re: multiline CSV fields