Re: Can't discover database size

From: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
To: Leandro Rodrigo Saad Cruz <leandro(at)ibnetwork(dot)com(dot)br>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Can't discover database size
Date: 2001-09-10 21:03:34
Message-ID: 200109102103.f8AL3Y8s005886@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Leandro Rodrigo Saad Cruz wrote:
>how can I discover the size of a single database inside data/

Assuming that by "size" you mean disk blocks:

template1=# select oid from pg_database where datname = 'junk';
oid
----------
12585534
(1 row)

template1=# \q
olly(at)linda:.../debian$ sudo du -s $PGDATA/base/12585534
Password:
1831 /usr1/postgres/data/base/12585534

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"Draw near to God and he will draw near to you.
Cleanse your hands, you sinners; and purify your
hearts, you double minded." James 4:8

Browse pgsql-admin by date

  From Date Subject
Next Message Lee Harr 2001-09-11 00:27:17 Re: Changing column modifiers?
Previous Message Leandro Rodrigo Saad Cruz 2001-09-10 20:06:34 Can't discover database size