aboutsummaryrefslogtreecommitdiff
path: root/doc/src
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:26 -0500
commit29e28134fa47ea6041dd89a1f7c0d34b6d0fc136 (patch)
treea4677e9fa666066a92f9993faac4f9a3ca3fb0ce /doc/src
parent987c4b401f4610fbc8d39922743584a366cc7146 (diff)
downloadpostgresql-29e28134fa47ea6041dd89a1f7c0d34b6d0fc136.tar.gz
postgresql-29e28134fa47ea6041dd89a1f7c0d34b6d0fc136.zip
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/src')
-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 2ce916922df..8fe1bb563f4 100644
--- a/doc/src/sgml/pgstattuple.sgml
+++ b/doc/src/sgml/pgstattuple.sgml
@@ -109,6 +109,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;