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

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Is there a way to make VACUUM run completely outside
Дата
Msg-id 20050207220141.GC11229@dcc.uchile.cl
обсуждение исходный текст
Ответ на Re: Is there a way to make VACUUM run completely outside  (Hannu Krosing <hannu@tm.ee>)
Ответы Re: Is there a way to make VACUUM run completely outside  (Hannu Krosing <hannu@tm.ee>)
Список 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 по дате отправления:

Предыдущее
От: Mark Kirkwood
Дата:
Сообщение: Re: Query optimizer 8.0.1 (and 8.0)
Следующее
От: pgsql@mohawksoft.com
Дата:
Сообщение: Re: Query optimizer 8.0.1 (and 8.0)