Re: Vacuum and inserts - Mailing list pgsql-general

From Michael Fuhr
Subject Re: Vacuum and inserts
Date
Msg-id 20080619141149.GA24935@winnie.fuhr.org
Whole thread Raw
In response to Vacuum and inserts  (Mark Wilden <mark.wilden@gmail.com>)
Responses Re: Vacuum and inserts  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Wed, Jun 18, 2008 at 12:29:46PM -0700, Mark Wilden wrote:
> My coworker and I are having an argument about whether it's necessary
> to VACUUM an insert-only table.
>
> 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.

http://www.postgresql.org/docs/8.3/interactive/routine-vacuuming.html#VACUUM-FOR-WRAPAROUND

"To avoid this, it is necessary to vacuum every table in every
database at least once every two billion transactions."

--
Michael Fuhr

pgsql-general by date:

Previous
From: "Albretch Mueller"
Date:
Subject: Re: HA best pratices with postgreSQL
Next
From: Bill Moran
Date:
Subject: Re: postgres generates too much processes per minute