Re: VACUUM and read-mostly tables

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: VACUUM and read-mostly tables
Дата
Msg-id 13828.1112715280@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: VACUUM and read-mostly tables  (Ian Westmacott <ianw@intellivid.com>)
Ответы Re: VACUUM and read-mostly tables  (Ian Westmacott <ianw@intellivid.com>)
Список pgsql-admin
Ian Westmacott <ianw@intellivid.com> writes:
> But the question is whether vacuum freezing tables will
> help me reduce the frequency of a full vacuum, or reduce
> its cost when we do it?  That is, if more transactions
> are frozen, will a full vacuum be more efficient
> (primarily in the I/O)?

I'm not sure if you are actually confused, or are just using confusing
terminology ... but there's a significant difference between VACUUM FULL
(ie, vacuum and try to reclaim space) and a database-wide vacuum.  I
*think* you are using "full vacuum" to mean "database-wide vacuum" but
it's not entirely clear.

Anyway, the frequency with which you have to do database-wide vacuums to
avoid XID wraparound is determined entirely by the rate at which you use
up XIDs.  Doing piecemeal VACUUM FREEZEs would reduce the amount of work
that needs to be done in the eventual database-wide vacuum, but it's not
clear that it'd be a net win given the added work of the extra VACUUM
scans.

Have you looked at whether you can slow down the rate of XID consumption
(ie, by bundling operations into larger transactions)?  That might be a
more useful route to limiting the costs involved.

            regards, tom lane

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

Предыдущее
От: Ian Westmacott
Дата:
Сообщение: Re: VACUUM and read-mostly tables
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: VACUUM and read-mostly tables