Re: Is there a way to make VACUUM run completely outside - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: Is there a way to make VACUUM run completely outside
Date
Msg-id 1107863747.5538.4.camel@fuji.krosing.net
Whole thread Raw
In response to Re: Is there a way to make VACUUM run completely outside  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Responses Re: Is there a way to make VACUUM run completely outside  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
List 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@tm.ee>


pgsql-hackers by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: AT TIME ZONE
Next
From: Michael Glaesemann
Date:
Subject: Re: AT TIME ZONE