Re: How to cope with low disk space - Mailing list pgsql-general

From Shane Ambler
Subject Re: How to cope with low disk space
Date
Msg-id 47B48761.6080506@Sheeky.Biz
Whole thread Raw
In response to Re: How to cope with low disk space  (Michiel Holtkamp <michiel.holtkamp@soundintel.com>)
Responses Re: How to cope with low disk space
List pgsql-general
Is postgresql the only thing using the disk space/partition?

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.

I would also think you would want to consider the size of the old stored
data when deciding how many records to delete.


> To give you an idea of the figures we are talking about: Say we have
> a 250 GB disk. Normally we would use about 4-8 GB of database.


Given that you normally have 4-8GB of data and you have trouble when a
fault/error causes an excess of 200GB I would also think about
triggering a stop recording under those conditions. If it takes 200GB of
data to automate a data purging then the purging of *all* old records is
going to give you a short time of extra space unless you start purging
the beginning of the current erroneous recording.


I am thinking that a cron job that will email/page/sms you when it hits
50% disk usage would be a better solution that would simply give you a
heads up to find and fix the fault causing the excess usage.





--

Shane Ambler
pgSQL (at) Sheeky (dot) Biz

Get Sheeky @ http://Sheeky.Biz

pgsql-general by date:

Previous
From: "Greg Fausak"
Date:
Subject: Maximum realistic number of database user accounts?
Next
From: Nathan Wilhelmi
Date:
Subject: Re: Deferred constraints and locks...