Skip site navigation (1) Skip section navigation (2)

Disk space problem...

From: Ken Corey <ken(dot)corey(at)atomic-interactive(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Disk space problem...
Date: 2001-12-01 09:43:57
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Hi All,

Has anyone else run into a situation where the vacuum procedures didn't 
really work?

I have maybe 500,000 rows in a database.  When using pg_dumpall, I get a 92MB 
sql file.  This database was managing to fill up a 13GB partition, even 
though I had a 'vacuumdb -a -z' running every night.  

So, I deleted the old data and restored into an empty database freshly 
created with initdb, the data only took up 256MB. 

By the next morning, disk usage had grown to 650MB.  Vacuuming only seemed to 
exacerbate the problem, as after vacuuming it's now 850 MB.  92 of that is in 
pg_xlog, which I know will fluctuate, and am assiming will eventually go 
away.  However, I just lost another 100 MB!

Several of my tables are being emptied and totally replaced (statistics about 
how my website is running, that sort of thing).  Is it better to drop the 
table, and rebuild it in this case?

Any other suggestions other than to pg_dumpall, initdb, and restore on a 
regular basis?

Ken Corey, CTO    Atomic Interactive, Ltd.   ken(dot)corey(at)atomic-interactive(dot)com


pgsql-novice by date

Next:From: Tom LaneDate: 2001-12-01 17:20:09
Subject: Re: Disk space problem...
Previous:From: Tom LaneDate: 2001-11-30 23:16:01
Subject: Re: Learning to read explain

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group