Re: shrinking physical space used

From: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: shrinking physical space used
Date: 2004-11-14 08:44:28
Message-ID: 20041114094428.I568@hermes.hilbert.loc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> i've got a database that takes up 4G of space. when i run a script that
> deletes all rows and then vacuum, the data directory gets down to
> around 3-3.5G. what i'd like is to get a blank database structure that
> really contains no data at all, or any unused space at all. apparently
> that's not what i'm getting now. is there a way to get this apart from
> dump, initdb, restore? i figure that if i could dump/initdb/restore i'd
> probably get a data directory with around 30MB only.

You likely need to run VACUUM one way or another and also
REINDEX. Will likely need some downtime but *will* eventually
alleviate your troubles. As for VACUUM be aware of the
*_fsm_pages_* parameter to be set appropriately.

Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2004-11-14 10:45:44 Re: Documentation of server configuration
Previous Message Patrick B Kelly 2004-11-14 06:57:57 Re: I spoke with Marc from the postgresql mailing