Thread: Postgresql database size problem

Postgresql database size problem

From
yves@mail2.vlaanderen.net
Date:
On Fri, Mar 16, 2001 at 12:01:36AM +0000, Thomas Lockhart wrote:
> > > You are not quite factually correct above, even given your definition of
> > > "bug". PostgreSQL does reuse deleted record space, but requires an
> > > explicit maintenance step to do this.
> > Could you tell us what that maintenance step is? dumping the db and restoring into a fresh one ? :/
>
> :) No, "VACUUM" is your friend for this. Look in the reference manual
> for details.
>
>                      - Thomas

I'm having this problem:
I have a database that is 3 megabyte in size (measured using pg_dump). When
i go to the corresponding data directory (eg du -h data/base/mydbase), it
seems the real disk usage is 135 megabyte! Doing a VACUUM doesn't really
change the disk usage.

Also query & updating speed increases when i dump all data and restore
it into a fresh new database.

I'm running postgresql-7.0.2-6 on a Debian potato.

-Yves

Re: Postgresql database size problem

From
jdassen@cistron.nl (J.H.M. Dassen (Ray))
Date:
yves@mail2.vlaanderen.net <yves@mail2.vlaanderen.net> wrote:
>I'm running postgresql-7.0.2-6 on a Debian potato.

Any particular reason why you're not running 7.0.3 (which is the latest
release and contains fixes for some problems with 7.0.2)?

Ray
--
"People should never have been given free will."  Lots of languages.
    Larry Wall on common fallacies of language design