7.1 Beta 1 & table size calculation

Started by Dale Andersonover 25 years ago2 messagesgeneral
Jump to latest
#1Dale Anderson
danderso@crystalsugar.com

I am looking at 7.1 beta 1 to see how my application (currently on 7.0.3) will operate under 7.1. To calculate used space, in 7.0.3, I lookup the relpages count for the table in pg_class and multiply it by 8 (8k is my block size). In my testing of 7.1 beta 1, I created a record of length 24947, but the relpages count is only 1 (after a vacuum analyze, and with block size of 8k). Is the relpages counts under 7.1 no longer valid of the physical page storage??? and what would the correct way be to calculate this under 7.1 beta 1 ????

Thanks in Advance,
Dale.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Dale Anderson (#1)
Re: 7.1 Beta 1 & table size calculation

"Dale Anderson" <danderso@crystalsugar.com> writes:

Is the relpages counts under 7.1 no longer valid of the physical page
storage?

It's still valid, but you need to include the associated TOAST table
as well as the primary relation.

Keep in mind also that TOAST can do inline compression. If you made
your test record with something like repeat('x',29000), it probably
got compressed to not very many bytes ...

regards, tom lane