Re: table size and storage location - Mailing list pgsql-general

From paul rivers
Subject Re: table size and storage location
Date
Msg-id 47E689A8.4090802@gmail.com
Whole thread Raw
In response to table size and storage location  (chuckee <mi6@orcon.net.nz>)
Responses Re: table size and storage location  (chuckee <mi6@orcon.net.nz>)
List pgsql-general
chuckee wrote:
> 1) how do I find out the size, in MB, of a particular table (called
> 'capture' in this case).
> I tried entering the SQL query SELECT (pg_tablespace_size('capture'));
> The result was the following:
> ERROR:  tablespace "capture" does not exist
>

You're looking for pg_relation_size('capture') or
pg_total_relation_size('capture'). A tablespace is a named location for
creating objects.


> 2) how do I find out where the actual files for the database are stored on
> my system?
> Where is the default storage location?
>

The complete story is laid out in the docs here:
http://www.postgresql.org/docs/8.3/interactive/storage-file-layout.html


HTH,
Paul


pgsql-general by date:

Previous
From: "Pavel Stehule"
Date:
Subject: Re: scheduling stored procedure
Next
From: "Gurjeet Singh"
Date:
Subject: Re: How to concatenate a boolean to a text string for an EXECUTE stmt in a stored proc