Re: Vacuum and inserts

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Vacuum and inserts
Дата
Msg-id 12457.1213887010@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Vacuum and inserts  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-general
Michael Fuhr <mike@fuhr.org> writes:
> On Wed, Jun 18, 2008 at 12:29:46PM -0700, Mark Wilden wrote:
>> My theory is that since there are no outdated nor deleted rows, VACUUM
>> doesn't do anything.

> Rolled back transactions on an insert-only table can leave behind
> dead rows.  Also, even if the table never has dead rows you still
> have to vacuum periodically to prevent transaction ID wraparound.

Another reason why you might want to vacuum after a bulk insertion
is to get all the commit hint bits set, rather than leaving that
overhead to be done by live queries.

In 8.4 there might be yet another reason, if you have a GIN index
on the table: Teodor is talking about postponing some of the GIN
insertion work to VACUUM ...

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Logging Parameter Values
Следующее
От: Volkan YAZICI
Дата:
Сообщение: Re: Logging Parameter Values