drop database, vacuum full and disk space

From: "Antonio Grassi" <agrassic(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: drop database, vacuum full and disk space
Date: 2008-02-28 17:17:32
Message-ID: 7fb931000802280917u40d75389t791954b8ea8e00eb@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi list. I've searched the archives and I've seen a lot of posts related to
database size, vacuuming, etc., but I can't totally understand this.

I've a small database of about 300Mb (when initially loaded), whose data is
almost completely replaced in the night (via various "drop table" and the
load of dumps of such tables from other postgresql installation).

Altough I've autovacuum activated, the size of this database is now about
3Gb. I've also full vacuumed the base by hand from time to time since the
base was created, but that didn't help either.

Yesterday I recreated the database with another name, thus having database A
with 3Gb and database B with 300Mb. Then I made a "drop database A", and ran
vacuumdb -af. But the space used by postgresql didn't go down. This makes me
think that vacuum full just releases pages associated to existent database
objects, is this correct?

So my question is: is there a way to reclaim those 3Gb for the operating
system, without deleting (rm) the data dir, doing initdb again and
recreating the database (to finish up with one database of about 300Mb and
300Mb of disk usage)?

Thanks in advance,
Antonio

PS: Yes, I've very few disk space, and no, recreating the database from
scratch (in the 'rm' sense) wouldn't be too easy (work place
particularities).

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Marlowe 2008-02-28 18:17:12 Re: Pgsql 8.2.5 Installation
Previous Message salman 2008-02-28 16:06:59 Re: Failover of the Primary database and starting the standby database in Postgresql in PITR configuraiton?