pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedSQL query to check size of database
2+ messages / 2 participants
[nested] [flat]
* SQL query to check size of database
@ 1999-07-14 12:52 webmaster <webmaster@tony.cz>
1999-07-14 13:35 ` Re: [SQL] SQL query to check size of database Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: webmaster @ 1999-07-14 12:52 UTC (permalink / raw)
To: pgsql-sql
Hi, I have following problem:
My provider allows me to host my site and my pg database, but limited only by
50MB with quota system. I can only ftp to my home dir, but I
don't have the direct acces to /var/lib/data/base/my_database directory, so I
can't see my files and their sizes. Nor with ftp client nor php script (and
this is running as user nobody so it'd not help at all), no access to telnet
port from my IP. I would like to add some new tables (quite long) but I'm not
sure I have enough free space now. And asking the provider every time about
used space isn't the right way...
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.
Thanks for any ideas (hope it's interesting not only for me)...
-- Michal Samek, Tony distribuce s.r.o.
webmaster@tony.cz (++420659/321350)
ICQ: 38607210
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [SQL] SQL query to check size of database
1999-07-14 12:52 SQL query to check size of database webmaster <webmaster@tony.cz>
@ 1999-07-14 13:35 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 1999-07-14 13:35 UTC (permalink / raw)
To: webmaster@tony.cz; +Cc: 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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~1999-07-14 13:35 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-07-14 12:52 SQL query to check size of database webmaster <webmaster@tony.cz>
1999-07-14 13:35 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox