how to get postgresql page size?

Started by Freddy Menjívar M.over 22 years ago2 messagesgeneral
Jump to latest
#1Freddy Menjívar M.
mmfreddy@hotmail.com

Hi...

SELECT sum(relpages)* (PAGESIZE) FROM pg_class
WHERE relkind='r' AND relname = 'table'

I want to know how many disk space is a database table using something
like above

where (PAGESIZE) is the postgresql page size value.

how can I get the ??? value...

- I now default value for (PAGESIZE) is 8k, but if it was changed (BLCKSZ,
postgresql.h)?
- I need to know the (PAGESIZE) value without reading postgresql source
files...

-----------------------
Freddy Menj�var M.
ITCR

_________________________________________________________________
Charla con tus amigos en l�nea mediante MSN Messenger:
http://messenger.yupimsn.com/

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Freddy Menjívar M. (#1)
Re: how to get postgresql page size?

"Freddy Mnjvr" <mmfreddy@hotmail.com> writes:

- I need to know the (PAGESIZE) value without reading postgresql source
files...

pg_controldata is the only way I can think of offhand.

regards, tom lane