Re: Determine dead tuples size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alexey Romanchuk <aromanchuk@xxxxxxxxxx> writes:
> When i try to sum all size (live, dead and free) the sum is not equal
> total size. For this table 206555428 + 3380295 + 13896816 = 223832539.
> The difference between total and sum is 9410085. It is near 5%.

pgstattuple is a bit simplistic: it doesn't count the page headers or
item pointers at all.  It looks to me like it also fails to consider
the effects of alignment padding --- if a tuple's length is shown as
63, that's what it counts, even though the effective length is 64.
(This might not be a problem in practice --- I'm not sure if the stored
t_len has always been maxaligned or not.)

			regards, tom lane


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux