Re: [SQL] SQL query to check size of database - Mailing list pgsql-sql

From Tom Lane
Subject Re: [SQL] SQL query to check size of database
Date
Msg-id 25329.931959314@sss.pgh.pa.us
Whole thread Raw
In response to SQL query to check size of database  (webmaster <webmaster@tony.cz>)
List pgsql-sql
webmaster <webmaster@tony.cz> writes:
> Is there any way how to retrieve the information about file sizes with
> some SQL query? I know I can do something like SELECT * FROM
> pg_classes but I'm not sure if i can use the information from fields
> 'reltuples' and 'relpages' - I was experimenting with those values but
> without succes - trying to find the constant value of the page size -
> it seems not work.

I think relpages is accurate after a VACUUM, but it's not maintained
on-the-fly...
        regards, tom lane


pgsql-sql by date:

Previous
From: webmaster
Date:
Subject: SQL query to check size of database
Next
From: Tom Lane
Date:
Subject: Re: [SQL] WHERE clause?