Re: pg_database_size() and actual disk space usage

From: Raghavendra <raghavendra(dot)rao(at)enterprisedb(dot)com>
To: Alexander Fortin <alexander(dot)fortin(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: pg_database_size() and actual disk space usage
Date: 2012-03-29 09:41:29
Message-ID: CA+h6AhgGgREbgpt2bobXUzunppWRbgii2TYMSksSbeYouM9Agg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, Mar 29, 2012 at 3:06 PM, Alexander Fortin <
alexander(dot)fortin(at)gmail(dot)com> wrote:

> 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!
>
> Yes, pg_database_size include indexes in the database.

Can you also tell what replication is in place ?

---
Regards,
Raghavendra
EnterpriseDB Corporation
Blog: http://raghavt.blogspot.com/

> --
> Alexander Fortin
> http://about.me/alexanderfortin/
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Alexander Fortin 2012-03-29 10:41:11 Re: pg_database_size() and actual disk space usage
Previous Message Alexander Fortin 2012-03-29 09:36:58 pg_database_size() and actual disk space usage