Re: Is it ever necessary to vacuum a table that only gets inserts/updates?

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Is it ever necessary to vacuum a table that only gets inserts/updates?
Дата
Msg-id CAD2md3GxFaaiwDURVpyqdAumnHMecHjKZL5BZFcfMNZoPW52dw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Is it ever necessary to vacuum a table that only gets inserts/updates?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Is it ever necessary to vacuum a table that only gets inserts/updates?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general


On Nov 17, 2011 1:32 PM, "Tom Lane" <tgl@sss.pgh.pa.us> wrote:
>
> John R Pierce <pierce@hogranch.com> writes:
> > On 11/16/11 4:24 PM, Jason Buberel wrote:
> >> Just wondering if there is ever a reason to vacuum a very large table
> >> (> 1B rows) containing rows that never has rows deleted.
>
> > no updates either?
>
> To clarify: in Postgres, an "update" means an insert and a delete.
> So unless you mean that this table is insert-only, you certainly
> still need vacuum.
>
> > you still want to do a vacuum analyze every so often to update the
> > statistics used by the planner.
>
> If it's purely an insert-only table, such as a logging table, then in
> principle you only need periodic ANALYZEs and not any VACUUMs.
>

Won't a VACUUM FREEZE (or autovac equivalent) be necessary eventually, to handle xid wraparound? If so, doing it pre-emptively might help avoid a giant I/O load and work pause when its forced.

Or am I just confused?

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

Предыдущее
От: Emanuel Araújo
Дата:
Сообщение: connection manager pgpool... help
Следующее
От: Yan Chunlu
Дата:
Сообщение: Re: how could duplicate pkey exist in psql?