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

From Alvaro Herrera
Subject Re: Is there a way to make VACUUM run completely outside
Date
Msg-id 20050207220141.GC11229@dcc.uchile.cl
Whole thread Raw
In response to Re: Is there a way to make VACUUM run completely outside  (Hannu Krosing <hannu@tm.ee>)
Responses Re: Is there a way to make VACUUM run completely outside
List pgsql-hackers
On Mon, Feb 07, 2005 at 07:16:41PM +0200, Hannu Krosing wrote:

> If all the changes it does to internal data storage can be rolled back,
> then I can't see how VACUUM FULL can work at all without requiring 2x
> the filesize for the ROLLBACK.

I think the point is that the table is still consistent if the system
crashes while vacuum is running.  For the internal details, see Xvac in
the HeapTupleHeader struct.

> 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.)

-- 
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"There was no reply" (Kernel Traffic)


pgsql-hackers by date:

Previous
From: Mark Kirkwood
Date:
Subject: Re: Query optimizer 8.0.1 (and 8.0)
Next
From: pgsql@mohawksoft.com
Date:
Subject: Re: Query optimizer 8.0.1 (and 8.0)