Обсуждение: 7.1 Beta 1 & table size calculation

Поиск
Список
Период
Сортировка

7.1 Beta 1 & table size calculation

От
"Dale Anderson"
Дата:
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
usedspace, 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).
Inmy 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???
andwhat would the correct way be to calculate this under 7.1 beta 1 ???? 

Thanks in Advance,
Dale.



Re: 7.1 Beta 1 & table size calculation

От
Tom Lane
Дата:
"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