postgres.git / summary / log / commit / refs

commit    f60daa3bdc2d268077cf618b170ebe4443ed6377
Author:   Andrew Dunstan <andrew@dunslane.net>
Date:     Tue Dec 27 16:23:46 2016 +0000

    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.


doc/src/sgml/pgstattuple.sgml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/src/sgml/pgstattuple.sgml b/doc/src/sgml/pgstattuple.sgml index 9c282b12c06..2e7b388ca68 100644 --- a/doc/src/sgml/pgstattuple.sgml +++ b/doc/src/sgml/pgstattuple.sgml @@ -110,6 +110,16 @@ free_percent | 1.95 </tgroup> </table> + <note> + <para> + The <literal>table_len</literal> will always be greater than the sum + of the <literal>tuple_len</literal>, <literal>dead_tuple_len</literal> + and <literal>free_space</literal>. The difference is accounted for by + fixed page overhead, the per-page table of pointers to tuples, and + padding to ensure that tuples are correctly aligned. + </para> + </note> + <para> <function>pgstattuple</function> acquires only a read lock on the relation. So the results do not reflect an instantaneous snapshot; [parent: a6d5e47e68d1]