Re: Name for new VACUUM - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Name for new VACUUM
Date
Msg-id 14469.996792056@sss.pgh.pa.us
Whole thread Raw
In response to Re: Name for new VACUUM  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Name for new VACUUM
List pgsql-hackers
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.

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.

> 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?
        regards, tom lane


pgsql-hackers by date:

Previous
From: rychu@sky.pl
Date:
Subject: Odpowied¼ automatyczna
Next
From: Hannu Krosing
Date:
Subject: Re: Re: OID wraparound: summary and proposal