From: Hans Guijt <hg@terma.com>
To: pgsql-admin@postgresql.org
Subject: Finding out free space?
Date: Tue, 14 Nov 2006 15:39:49 +0100
Message-ID: <000701c707fa$bd3209a0$ab14010a@nlpc17> (raw)
I need to provide an alarm function that will alert my customer when the
amount of free space in a database has reached some critical threshold. This
problem is not entirely trivial, since free space can be located both in the
file system and in the database itself.
I'm not looking for a particularly accurate function (and suspect that one
is probably not feasible anyway) - anything that comes to within a gigabyte
of the actual value is fine with me. Basically I need to figure out two
things:
1. Where does Postgres stores its datafiles? This will allow me to figure
out how much space is still available on the filing system.
2. How much space is unused within the data files themselves?
I'd appreciate a pointer on where I should look for this sort of
information.
Regards,
Hans Guijt
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-admin@postgresql.org
Cc: hg@terma.com
Subject: Re: Finding out free space?
In-Reply-To: <000701c707fa$bd3209a0$ab14010a@nlpc17>
References: <000701c707fa$bd3209a0$ab14010a@nlpc17>
* 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