Re: Is it ever necessary to vacuum a table that only gets inserts/updates? - Mailing list pgsql-general

From Craig Ringer
Subject Re: Is it ever necessary to vacuum a table that only gets inserts/updates?
Date
Msg-id CAD2md3GxFaaiwDURVpyqdAumnHMecHjKZL5BZFcfMNZoPW52dw@mail.gmail.com
Whole thread Raw
In response to Re: Is it ever necessary to vacuum a table that only gets inserts/updates?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Is it ever necessary to vacuum a table that only gets inserts/updates?  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Emanuel Araújo
Date:
Subject: connection manager pgpool... help
Next
From: Yan Chunlu
Date:
Subject: Re: how could duplicate pkey exist in psql?