tuple, recording its
presence and size in the appropriate counters, and adding up the
free space on the page. At the end, it estimates the total number of
live tuples based on the number of pages and tuples scanned (in the
same way that VACUUM estimates pg_class.reltuples).
</para>
<table id="pgstatapprox-columns">
<title><function>pgstattuple_approx</function> Output Columns</title>
<tgroup cols="3">
<thead>
<row>
<entry>Column</entry>
<entry>Type</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><structfield>table_len</structfield></entry>
<entry><type>bigint</type></entry>
<entry>Physical relation length in bytes (exact)</entry>
</row>
<row>
<entry><structfield>scanned_percent</structfield></entry>
<entry><type>float8</type></entry>
<entry>Percentage of table scanned</entry>
</row>
<row>
<entry><structfield>approx_tuple_count</structfield></entry>
<entry><type>bigint</type></entry>
<entry>Number of live tuples (estimated)</entry>
</row>
<row>
<entry><structfield>approx_tuple_len</structfield></entry>
<entry><type>bigint</type></entry>
<entry>Total length of live tuples in bytes (estimated)</entry>
</row>
<row>
<entry><structfield>approx_tuple_percent</structfield></entry>
<entry><type>float8</type></entry>
<entry>Percentage of live tuples</entry>
</row>
<row>
<entry><structfield>dead_tuple_count</structfield></entry>
<entry><type>bigint</type></entry>
<entry>Number of dead tuples (exact)</entry>
</row>
<row>
<entry><structfield>dead_tuple_len</structfield></entry>
<entry><type>bigint</type></entry>
<entry>Total length of dead tuples in bytes (exact)</entry>
</row>
<row>
<entry><structfield>dead_tuple_percent</structfield></entry>
<entry><type>float8</type></entry>
<entry>Percentage of dead tuples</entry>
</row>
<row>
<entry><structfield>approx_free_space</structfield></entry>
<entry><type>bigint</type></entry>
<entry>Total free space in bytes (estimated)</entry>
</row>
<row>
<entry><structfield>approx_free_percent</structfield></entry>
<entry><type>float8</type></entry>
<entry>Percentage of free space</entry>
</row>
</tbody>
</tgroup>
</table>
<para>
In the above output, the free space figures may not match the
<function>pgstattuple</function> output exactly, because the free
space map gives us an exact figure, but is not guaranteed to be
accurate to the byte.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect2>
<sect2 id="pgstattuple-authors">
<title>Authors</title>
<para>
Tatsuo Ishii, Satoshi Nagayasu and Abhijit Menon-Sen
</para>
</sect2>
</sect1>