Re: [DOCS] Autovacuum and XID wraparound

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [DOCS] Autovacuum and XID wraparound
Дата
Msg-id 20070514221619.GC8916@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: [DOCS] Autovacuum and XID wraparound  (Chris Browne <cbbrowne@acm.org>)
Ответы Re: [DOCS] Autovacuum and XID wraparound  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
Chris Browne wrote:

> Would the following 'maintenance' regimen be truly safe against XID
> wraparound:
>
>  - Most tables are being vacuumed regularly, so that
>    pg_class.relfrozenxid is kept "safe."
>
>  - There are some tables that periodically get TRUNCATEd so that, in
>    principle, they never need to be vacuumed.
>
> Is it actually true that we'd never need to vacuum those tables
> (assuming 8.2+)?  I suppose it would be rather cheap to VACUUM
> immediately after the TRUNCATE...

You'd need to vacuum after the truncate.  It would be pretty cheap, the
tables being empty.

I suppose it would be pretty trivial to set the relfrozenxid to
RecentXmin or something during TRUNCATE.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

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

Предыдущее
От: Chris Browne
Дата:
Сообщение: Re: [DOCS] Autovacuum and XID wraparound
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [DOCS] Autovacuum and XID wraparound