From: Tom Lane <tgl@sss.pgh.pa.us>
To: aromanchuk@swsoft.com
Cc: pgsql-performance@postgresql.org
Subject: Re: Determine dead tuples size
Date: Fri, 16 Mar 2007 10:29:09 -0400
Message-ID: <6304.1174055349@sss.pgh.pa.us> (raw)
In-Reply-To: <17410023575.20070316114150@swsoft.com>
References: <24499713.20070315135847@swsoft.com>
<20070315114508.GA12266@winnie.fuhr.org>
<17410023575.20070316114150@swsoft.com>
Alexey Romanchuk <aromanchuk@swsoft.com> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, aromanchuk@swsoft.com
Subject: Re: Determine dead tuples size
In-Reply-To: <6304.1174055349@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox