Re: vacuumdb

Поиск
Список
Период
Сортировка
От Guido Barosio
Тема Re: vacuumdb
Дата
Msg-id f7f6b4c70602131241y2faf60fer2f3c05ea986a5c83@mail.gmail.com
обсуждение исходный текст
Ответ на vacuumdb  (Juliano <juliano.listas@gmail.com>)
Список pgsql-admin
Hmmm, AFAIK no, but you can get the age of the databases, and guess if you need to issue a vacuum or not.

quote from the documentation (www.postgresql.org -> documentation):

SELECT datname, age(datfrozenxid) FROM pg_database;

The age column measures the number of transactions from the cutoff XID to the current transaction's XID.

With the standard freezing policy, the age column will start at one billion for a freshly-vacuumed database. When the age approaches two billion, the database must be vacuumed again to avoid risk of wraparound failures. Recommended practice is to vacuum each database at least once every half-a-billion (500 million) transactions, so as to provide plenty of safety margin. To help meet this rule, each database-wide VACUUM automatically delivers a warning if there are any pg_database entries showing an age of more than 1.5 billion transactions, for example:

play=# VACUUM;
WARNING: some databases have not been vacuumed in 1613770184 transactions
HINT: Better vacuum them within 533713463 transactions, or you may have a wraparound failure.
VACUUM

Best regards,
Guido

On 2/13/06, Juliano <juliano.listas@gmail.com> wrote:
Hi all,

There is a way to see vacuumdb last running ?

tks

--
Juliano



--
/"\   ASCII Ribbon Campaign  .
\ / - NO HTML/RTF in e-mail  .
X  - NO Word docs in e-mail .
/ \ -----------------------------------------------------------------

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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: vacuumdb
Следующее
От: "Jim Fu"
Дата:
Сообщение: to_date