From: | Carol Walter <walterc(at)indiana(dot)edu> |
---|---|
To: | Chris Browne <cbbrowne(at)acm(dot)org> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Raw disk space used |
Date: | 2007-08-01 16:34:07 |
Message-ID: | C2DB6608-F53B-4CB7-BB2C-8A61A26C2239@indiana.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Thanks so much fro the info.
I've done as you suggested and I've got the correct directories. I
have a second question now. There are forty-four numeric entries in
the directory for the first databases that I looked at. The database
in question has only eight tables. There are eight tables that have
recent dates. Do I need the total of all the files or just the eight
that appear to be the tables that are being updated?
Thanks again,
Carol
On Aug 1, 2007, at 9:25 AM, Chris Browne wrote:
> walterc(at)indiana(dot)edu (Carol Walter) writes:
>> Is there a way to tell what the raw disk space used by a single
>> database is? I know that databases are fluid, but if there is way to
>> do even a snap shot view that is a "ball park" figure, I'd be happy.
>> My user keeps clammering for this figure.
>
> Sure, you can identify the database via "select oid, * from
> pg_catalog.pg_database;"
>
> Then you should be able to head to $PGDATA (where ever the database
> data lives), and run "du", and search for the directory whose name is
> the "oid" value for the database that you wanted to analyze.
>
> If users are using tablespaces, then tables can live in
> user-controlled places, which would make it rather more complex to do
> this analysis, but if they have kept to the simpler approach of just
> letting data fall where it will, this should do the trick...
> --
> (reverse (concatenate 'string "gro.mca" "@" "enworbbc"))
> http://linuxfinances.info/info/linux.html
> "High-level languages are a pretty good indicator that all else is
> seldom equal." - Tim Bradshaw, comp.lang.lisp
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org
From | Date | Subject | |
---|---|---|---|
Next Message | Tino Schwarze | 2007-08-01 16:46:18 | Re: Raw disk space used |
Previous Message | Chris Browne | 2007-08-01 13:25:20 | Re: Raw disk space used |