Re: Is there a way to make VACUUM run completely outside

From: Hannu Krosing <hannu(at)tm(dot)ee>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Is there a way to make VACUUM run completely outside
Date: 2005-02-08 11:55:47
Message-ID: 1107863747.5538.4.camel@fuji.krosing.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Ühel kenal päeval (esmaspäev, 7. veebruar 2005, 19:01-0300), kirjutas
Alvaro Herrera:

> > Also, why must it be run outside of transaction block if it can be
> > rollbacked ?
>
> A vacuum actually uses several transactions, so it wouldn't work as the
> user would expect if run in a transaction. The first one is committed
> rather early and new ones are opened and closed. (One per table, IIRC.)

So I guess that making it commit and open new transaction at a regular
interval (like each minute) during vacuuming single table would not
alter its visible behaviour. That would solve my problem of long-running
vacuums on large tables polluting unrelated small but heavily updated
tables with dead tuples.

I'll take a peak at code and try to come up with a naive proposal you
can shoot down ;)

--
Hannu Krosing <hannu(at)tm(dot)ee>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Glaesemann 2005-02-08 12:02:27 Re: AT TIME ZONE
Previous Message Christopher Kings-Lynne 2005-02-08 11:43:48 Re: AT TIME ZONE