pg_database_size differs from df -s

From: Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: pg_database_size differs from df -s
Date: 2012-06-06 14:33:53
Message-ID: 4FCF6A51.9090104@frank.uvena.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi folks,

I've got an issue I'm not sure I might have a misunderstanding. When
calling

select sum(pg_database_size(datid)) as total_size from pg_stat_database

the result is much bigger than running a df -s over the postgres folder
- Its about factor 5 to 10 depending on database.

My understanding was, pg_database_size is the database size on disc. Am
I misunderstanding the docu here?

Cheers,
Frank

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Manoj Govindassamy 2012-06-06 14:55:15 Postgres 9.1 Synchronous Replication and stuck queries during sync repl setup
Previous Message Tom Lane 2012-06-06 14:05:55 Re: I'd like to learn a bit more about how indexes work