In response to Michiel Holtkamp <michiel.holtkamp@xxxxxxxxxxxxxx>: > > On Feb 14, 2008, at 19:24 , Shane Ambler wrote: > > Is postgresql the only thing using the disk space/partition? > > There are some other things on the partition, but they don't change > in size. > > > Have you considered running a cron job to parse df output to > > "trigger" a > > delete when disk usage gets to a set threshold? and thus also account > > for any unexpected non-postgresql disk usage. > > Yes, but this is not ideal: > > 1) sometimes we want a lot of data, just not that the disk runs out > of free space > 2) if you trigger on a disk space threshold only, you'll have to do a > full vacuum and that gives problem in our application Not necessarily. let's say you trigger the cleanup job to run at 50% used space, which is a pretty good place to start considering normal operation is less than 5%. At that point, if your run a normal vacuum, 40% or more of the space in the tables will be available for reuse. Normal vacuum _will_ return _some_ disk space to the OS, but is not nearly as aggressive as vacuum full is. At that point, even if the size of the tables on disk is 40% of the usable drive size, the amount of space available in the tables will be 90% ore more, and the addition of more data will reuse that unused space. This _requires_ frequent vacuum, and accurate estimation of how quickly you need to trigger the process. It's probably going to take some experimentation and babysitting on your part to get it right. Were it me, I'd just add some hard drives to get the system up to about 1T of disk space. If you can't get that budget, you'll have to be a little more clever about it. -- Bill Moran http://www.potentialtech.com ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org/