> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> >> I really don't understand why you're so hot to avoid changing the
> >> default behavior of VACUUM.
>
> > I am concerned because UPDATE consumes disk space that never gets
> > returned to the OS until a traditional vacuum is run.
>
> Not necessarily. Concurrent VACUUM does truncate the relation if it can
> do so conveniently --- for example, it will successfully reclaim space
> if you do "DELETE FROM foo; VACUUM foo;". It just doesn't try as hard
> as the older VACUUM code does.
But it will not reclaim from UPDATE. You also will have to VACUUM
NOLOCK right after your delete or the next INSERT is going to go on the
end and VACUUM NOLOCK is not going to compact the table, right?
> IMHO, average disk space usage for a real-world database may well be
> *lower* with the new style of VACUUM than with the old style, simply
> because you can afford to do new-style VACUUM more often. The old-style
> VACUUM might give you a lower space usage just after a VACUUM, but if
> you can only afford to do that on nights or weekends, it's cold comfort.
> Your disk hardware needs are going to be determined by peak space usage,
> not minimum or even average usage, and time between VACUUMs is what
> drives that. On a peak-usage basis I have no doubt that frequent
> new-style VACUUMs will win hands down over infrequent old-style.
My contention is that we are causing more problems for administrators by
changeing VACUUM's default behavior. Most people vacuum only at night
when no one is using the system, and they should get the LOCK version of
vacuum. (No change to scripts.) What will change is that people can
add VACUUM NOLOCK during the day to their cron scripts.
> > Maybe just call the traditional vacuum VACUUM LOCK. It was the
> > LOCK/NOLOCK idea that I think was important.
>
> Right now it's called VACUUM FULL, but I'm not particularly wedded to
> that name. Does anyone else like VACUUM LOCK? Or have an even better
> idea?
FULL seems overloaded to me. Maybe LOCK or FORCE.
-- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610)
853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill,
Pennsylvania19026