Re: REINDEX disk space requirements - Mailing list pgsql-admin

From Alvaro Herrera
Subject Re: REINDEX disk space requirements
Date
Msg-id 20091106171127.GF3840@alvh.no-ip.org
Whole thread Raw
In response to REINDEX disk space requirements  (David Schnur <dnschnur@gmail.com>)
List pgsql-admin
David Schnur escribió:

> I'm a developer on a product that includes a built-in PostgreSQL DB;
> currently 8.3.5.  One of our tables is very active - it can see in the tens
> of millions of rows inserted and deleted per day.  Generally speaking, new
> rows arrive throughout the day, and older rows from previous days are
> periodically deleted.  A task runs VACUUM ANALYZE after those deletions, to
> keep space available.

Immediately after the deletions, or is there some delay?  Keep in mind
that rows cannot be reclaimed until the oldest transaction that was open
when they were deleted is finished.  So if you vacuum too quickly, the
deleted rows may not be deleted.  It's better if you insert some delay
between delete and vacuum, the duration of which is dependent on the
duration of your transactions.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

pgsql-admin by date:

Previous
From: David Schnur
Date:
Subject: REINDEX disk space requirements
Next
From: Tom Lane
Date:
Subject: Re: REINDEX disk space requirements