summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2016-12-27 11:23:46 -0500
committerAndrew Dunstan <andrew@dunslane.net>2016-12-27 11:28:24 -0500
commitf60daa3bdc2d268077cf618b170ebe4443ed6377 (patch)
treeede3b2e360b67fff0c7eb09f865b6abd1c121b46 /doc
parenta6d5e47e68d1a0748ee830f03ca05f4236206d00 (diff)
downloadpostgresql-f60daa3bdc2d268077cf618b170ebe4443ed6377.tar.gz
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.
Diffstat (limited to 'doc')
-rw-r--r--doc/src/sgml/pgstattuple.sgml10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/src/sgml/pgstattuple.sgml b/doc/src/sgml/pgstattuple.sgml
index 9c282b12c0..2e7b388ca6 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;