Re: Determine dead tuples size

От: Tom Lane
Тема: Re: Determine dead tuples size
Дата: ,
Msg-id: 6304.1174055349@sss.pgh.pa.us
(см: обсуждение, исходный текст)
Ответ на: Re: Determine dead tuples size  (Alexey Romanchuk)
Список: pgsql-performance

Скрыть дерево обсуждения

Determine dead tuples size  (Alexey Romanchuk, )
 Re: Determine dead tuples size  ("Daniel Cristian Cruz", )
 Re: Determine dead tuples size  (Michael Fuhr, )
  Re: Determine dead tuples size  (Alexey Romanchuk, )
   Re: Determine dead tuples size  (Heikki Linnakangas, )
   Re: Determine dead tuples size  (Tom Lane, )

Alexey Romanchuk <> 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


В списке pgsql-performance по дате сообщения:

От: "Bruce McAlister"
Дата:
Сообщение: Re: PostgreSQL 8.2.3 VACUUM Timings/Performance
От: "hubert depesz lubaczewski"
Дата:
Сообщение: Re: Postgres batch write very slow - what to do