Skip to content

Commit c99436f

Browse files
doc: Update formula for vacuum insert threshold.
Oversight in commit 06eae9e. Reviewed-by: Melanie Plageman <melanieplageman@gmail.com> Discussion: https://postgr.es/m/aRODeqFUVkGDJSPP%40nathan Backpatch-through: 18
1 parent db0d2d7 commit c99436f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

doc/src/sgml/maintenance.sgml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -933,12 +933,16 @@ vacuum threshold = Minimum(vacuum max threshold, vacuum base threshold + vacuum
933933
The table is also vacuumed if the number of tuples inserted since the last
934934
vacuum has exceeded the defined insert threshold, which is defined as:
935935
<programlisting>
936-
vacuum insert threshold = vacuum base insert threshold + vacuum insert scale factor * number of tuples
936+
vacuum insert threshold = vacuum base insert threshold + vacuum insert scale factor * number of tuples * percent of table not frozen
937937
</programlisting>
938938
where the vacuum insert base threshold is
939939
<xref linkend="guc-autovacuum-vacuum-insert-threshold"/>,
940-
and vacuum insert scale factor is
941-
<xref linkend="guc-autovacuum-vacuum-insert-scale-factor"/>.
940+
the vacuum insert scale factor is
941+
<xref linkend="guc-autovacuum-vacuum-insert-scale-factor"/>,
942+
the number of tuples is
943+
<structname>pg_class</structname>.<structfield>reltuples</structfield>,
944+
and the percent of the table not frozen is
945+
<literal>1 - pg_class.relallfrozen / pg_class.relpages</literal>.
942946
Such vacuums may allow portions of the table to be marked as
943947
<firstterm>all visible</firstterm> and also allow tuples to be frozen, which
944948
can reduce the work required in subsequent vacuums.

0 commit comments

Comments
 (0)