1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-03 22:24:49 +03:00

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.
This commit is contained in:
Andrew Dunstan 2016-12-27 11:23:46 -05:00
parent 3ea56fffd6
commit 71f996d221

View File

@ -117,6 +117,16 @@ free_percent | 1.95
</tgroup> </tgroup>
</table> </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> <para>
<function>pgstattuple</function> acquires only a read lock on the <function>pgstattuple</function> acquires only a read lock on the
relation. So the results do not reflect an instantaneous snapshot; relation. So the results do not reflect an instantaneous snapshot;