Re: Still recommending daily vacuum...

From: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>
To: Michael Paesold <mpaesold(at)gmx(dot)at>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Gregory Stark <stark(at)enterprisedb(dot)com>, "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Still recommending daily vacuum...
Date: 2007-07-05 13:01:06
Message-ID: 468CEB92.4050308@phlo.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Michael Paesold wrote:
> Alvaro Herrera wrote:
>> So what you are proposing above amounts to setting scale factor = 0.05.
>> The threshold is unimportant -- in the case of a big table it matters
>> not if it's 0 or 1000, it will be almost irrelevant in calculations. In
>> the case of small tables, then the table will be vacuumed in almost
>> every iteration if the threshold is 0, which is fine because the table
>> is small anyway. So why not let the threshold be 0 and be done with it?
>
> For very small tables, setting a threshold of 0 could mean a vacuum
> after every single row update (or every other row). I think that is just
> burning cycles. What about a threshold of 10 or 50, to have at least
> some sanity limit? Even though the cost of vacuum of a small table is
> low, it is still not free, IMHO, no?

A bit off-topic (because probably not realistic in a 8.3 timeframe) -
but maybe the threshold should be specified in terms of "expected number of
pages to be freed", instead specifing a bias for the number of modified
rows as it is done now. Then "1" would probably be a reasonable default, because
a vacuum that won't free at least one page seems to be not really worth
the effort - it won't safe any future IO bandwith.

Just an idea I got while following this thread...

greetings, Florian Pflug

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2007-07-05 15:00:53 Re: Still recommending daily vacuum...
Previous Message Heikki Linnakangas 2007-07-05 11:26:45 Re: todo: Hash index creation

Browse pgsql-patches by date

  From Date Subject
Next Message Kevin Grittner 2007-07-05 15:00:53 Re: Still recommending daily vacuum...
Previous Message Michael Paesold 2007-07-05 07:30:17 Re: Still recommending daily vacuum...