Re: Autovacuum and OldestXmin

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Autovacuum and OldestXmin
Дата
Msg-id 200803072020.m27KKk403875@momjian.us
обсуждение исходный текст
Ответ на Re: Autovacuum and OldestXmin  (Christopher Browne <cbbrowne@acm.org>)
Список pgsql-hackers
Added to TODO:
       o Prevent autovacuum from running if an old transaction is still         running from the last vacuum
         http://archives.postgresql.org/pgsql-hackers/2007-11/msg00899.php


---------------------------------------------------------------------------

Christopher Browne wrote:
> The world rejoiced as alvherre@alvh.no-ip.org (Alvaro Herrera) wrote:
> > Simon Riggs wrote:
> >> I notice that slony records the oldestxmin that was running when it last
> >> ran a VACUUM on its tables. This allows slony to avoid running a VACUUM
> >> when it would be clearly pointless to do so.
> >> 
> >> AFAICS autovacuum does not do this, or did I miss that?
> >
> > Hmm, I think it's just because nobody suggested it and I didn't came up
> > with the idea.
> >
> > Whether it's a useful thing to do is a different matter.  Why store it
> > per table and not more widely?  Perhaps per database would be just as
> > useful; and maybe it would allow us to skip running autovac workers
> > when there is no point in doing so.
> 
> I think I need to take blame for that feature in Slony-I ;-).
> 
> I imagine it might be useful to add it to autovac, too.  I thought it
> was pretty neat that this could be successfully handled by comparison
> with a single value (e.g. - eldest xmin), and I expect that using a
> single quasi-global value should be good enough for autovac.
> 
> If there is some elderly, long-running transaction that isn't a
> VACUUM, that will indeed inhibit VACUUM from doing any good, globally,
> across the cluster, until such time as that transaction ends.
> 
> To, at that point, "inhibit" autovac from bothering to run VACUUM,
> would seem like a good move.  There is still value to running ANALYZE
> on tables, so it doesn't warrant stopping autovac altogether, but this
> scenario suggests a case for suppressing futile vacuuming, at least...
> -- 
> If this was helpful, <http://svcs.affero.net/rm.php?r=cbbrowne> rate me
> http://linuxfinances.info/info/slony.html
> It's hard to tell if someone is inconspicuous. 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
> 
>                http://www.postgresql.org/docs/faq

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://postgres.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Chernow
Дата:
Сообщение: Re: Commitfest process
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: Commitfest process