Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e9cf6e6

Browse files
committed
Explain unaccounted for space in pgstattuple.
In addition to space accounted for by tuple_len, dead_tuple_len and free_space, the table_len includes page overhead, the item pointers table and padding bytes. Backpatch to live branches.
1 parent 462ab6c commit e9cf6e6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

doc/src/sgml/pgstattuple.sgml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,16 @@ free_percent | 1.95
109109
</tgroup>
110110
</table>
111111

112+
<note>
113+
<para>
114+
The <literal>table_len</literal> will always be greater than the sum
115+
of the <literal>tuple_len</literal>, <literal>dead_tuple_len</literal>
116+
and <literal>free_space</literal>. The difference is accounted for by
117+
fixed page overhead, the per-page table of pointers to tuples, and
118+
padding to ensure that tuples are correctly aligned.
119+
</para>
120+
</note>
121+
112122
<para>
113123
<function>pgstattuple</function> acquires only a read lock on the
114124
relation. So the results do not reflect an instantaneous snapshot;

0 commit comments

Comments
 (0)