Re: Database size - Mailing list pgsql-general

From Craig Ringer
Subject Re: Database size
Date
Msg-id 4B4BB3EA.6070004@postnewspapers.com.au
Whole thread Raw
In response to Database size  ("Leonardo M." Ramé <l.rame@griensu.com>)
List pgsql-general
On 12/01/2010 2:00 AM, Leonardo M. Ramé wrote:
> A customer of mine asked me to periodically delete old, unneeded records
> containing ByteA fields, because he think it will reduce the database
> size on disk. Is this true?. For example, in Firebird, the database size
> is not reduced until you do a Backup-Restore of the database.

It won't shrink it unless you do a VACUUM FULL or CLUSTER, but it *will*
prevent growth or (if you're adding more data than you're deleting)
reduce the rate of growth.

Make sure autovacuum is running and (for pre-8.4 databases) your free
space map settings are sufficient.

--
Craig Ringer

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Using a lock to avoid: could not open relation with OID
Next
From: Omar Mehmood
Date:
Subject: replication from multiple "master" servers to a single read-only slave