pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: yves@mail2.vlaanderen.net
To: lockhart@fourpalms.org
Cc: pgsql-hackers@postgresql.org
Subject: Re: Re: [SQL] Re: why the DB file size does not reduce when 'delete'the data in DB?
Date: Fri, 16 Mar 2001 02:28:46 +0100
Message-ID: <20010316022846.A3804@asua2.vlaanderen.net> (raw)
In-Reply-To: <3AB157E0.9FEBFE69@alumni.caltech.edu>
References: <Pine.BSF.4.33.0103020804370.88613-100000@mobile.hub.org>
	<008601c0a44f$0d657b20$cc01a8c0@xyf>
	<20010307004601.A51050@ilse.nl>
	<1828207391.20010307111045@telekbird.com.cn>
	<3AA59C17.E2FDE23C@alumni.caltech.edu>
	<20010316004507.A3288@asua2.vlaanderen.net>
	<3AB157E0.9FEBFE69@alumni.caltech.edu>

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



view thread (12+ messages)

Message-ID: <20010316022846.A3804@asua2.vlaanderen.net>
Permalink:  ../20010316022846.A3804@asua2.vlaanderen.net/
Also on:    postgresql.org/message-id/20010316022846.A3804@asua2.vlaanderen.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: yves@mail2.vlaanderen.net, lockhart@fourpalms.org, pgsql-hackers@postgresql.org
  Subject: Re: [SQL] Re: why the DB file size does not reduce when 'delete'the data in DB?
  In-Reply-To: <20010316022846.A3804@asua2.vlaanderen.net>
  References: <Pine.BSF.4.33.0103020804370.88613-100000@mobile.hub.org> <008601c0a44f$0d657b20$cc01a8c0@xyf> <20010307004601.A51050@ilse.nl> <1828207391.20010307111045@telekbird.com.cn> <3AA59C17.E2FDE23C@alumni.caltech.edu> <20010316004507.A3288@asua2.vlaanderen.net> <3AB157E0.9FEBFE69@alumni.caltech.edu> <20010316022846.A3804@asua2.vlaanderen.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox