Re: Database-wide VACUUM ANALYZE

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Database-wide VACUUM ANALYZE
Дата
Msg-id 20070626184906.GE11609@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Database-wide VACUUM ANALYZE  ("Steven Flatt" <steven.flatt@gmail.com>)
Список pgsql-performance
Steven Flatt escribió:

> Most of our large (partitioned) tables are insert-only (truncated
> eventually) so will not be touched by autovacuum until wraparound prevention
> kicks in.  However the tables are partitioned by timestamp so tables will
> cross the 1.9 billion marker at different times (some not at all, as the
> data will have been truncated).

Note that as of 8.3, tables that are truncated do not need vacuuming for
Xid wraparound purposes, because the counter is updated on TRUNCATE (as
it is on CLUSTER and certain forms of ALTER TABLE).

> Do you still think the 250 million transactions away from shutdown is
> cutting it too close?  Recall that the unintentional db-wide vacuum analyze
> that was going on last week on our system took less than two days to
> complete.

Is this 8.1 or 8.2?  In the latter you don't ever need db-wide vacuums
at all, because Xid wraparound is tracked per table, so only tables
actually needing vacuum are processed.  To answer your question, the
followup question is how many transactions normally take place in two
days.  If they are way less than 250 million then you don't need to
worry.  Otherwise, the database may shut itself down to protect from Xid
wraparound.

--
Alvaro Herrera                         http://www.flickr.com/photos/alvherre/
"La soledad es compañía"

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

Предыдущее
От: Greg Smith
Дата:
Сообщение: Re: PostgreSQL Configuration Tool for Dummies
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: PostgreSQL Configuration Tool for Dummies