Subject: size of data files

From: Kent Archie <[email-masked]>
Date: Sat, 20 Nov 93 1:57:34 CST

Is there a way to determine the amount of space actually used
by Postgres tables. I just stored some data in my tables
and they jumped from 0 bytes to 8192. I assume there is
some minimum allocation regardless of the actual data stored.
But can I find the amount due to my data?
I am trying to compare the earlier file-based version
of my application to the Postgres one.
I expect the database to have higher overhead, but how much?
**kent
Kent Archie
[email-masked]

---

From: Chris Flatters <[email-masked]>
Date: Sun, 21 Nov 1993 21:50:46 GMT

> I expect the database to have higher overhead, but how much?

The POSTGRES page size is 8k bytes so the storage required for any class
is always rounded up to the next multiple of 8k.  You can make a rough
guess at the table size by multiplying the size of each tuple by the
number of tuples in the class and rounding up to a 8k multiple.  This may
give underestimate the number of 8k pages by one in a few cases since there
is a small amount of bookkeeping information stored with each page.

	Chris Flatters
	[email-masked]