From: Alexander Fortin <alexander.fortin@gmail.com>
To: pgsql-admin@postgresql.org
Subject: pg_database_size() and actual disk space usage
Date: Thu, 29 Mar 2012 11:36:58 +0200
Message-ID: <4F742D3A.8010501@gmail.com> (raw)
Hi folks,
I'm analyizing why our /var/lib/postgresql partition got a quick bump in
usage (from 32GB to 41GB) few days ago, even if, according to data from
monitoring software, database size kept increasing with no bump at all.
So I'm using "SELECT pg_database_size('mydb')" but I can't find much
documentation about what that "size" actually refers to. What I see is
that both the master and the replicas shows the same number (32GB), but
for both of those I see differences in the actual file system usage:
master:
41G /var/lib/postgresql/9.1/main/base
replica:
37G /var/lib/postgresql/9.1/main/base/
Does pg_database_size() return size occupied by indexes too? If not, the
difference could be due to index space I guess.
Thanks!
--
Alexander Fortin
http://about.me/alexanderfortin/
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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: alexander.fortin@gmail.com
Subject: Re: pg_database_size() and actual disk space usage
In-Reply-To: <4F742D3A.8010501@gmail.com>
* 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