| From: | Michael Fuhr <mike(at)fuhr(dot)org> |
|---|---|
| To: | Mark Wilden <mark(dot)wilden(at)gmail(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Vacuum and inserts |
| Date: | 2008-06-19 14:11:49 |
| Message-ID: | 20080619141149.GA24935@winnie.fuhr.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bill Moran | 2008-06-19 14:17:10 | Re: postgres generates too much processes per minute |
| Previous Message | Albretch Mueller | 2008-06-19 14:01:07 | Re: HA best pratices with postgreSQL |