mirror of
https://github.com/postgres/postgres.git
synced 2025-11-24 00:23:06 +03:00
doc: Update formula for vacuum insert threshold.
Oversight in commit 06eae9e621.
Reviewed-by: Melanie Plageman <melanieplageman@gmail.com>
Discussion: https://postgr.es/m/aRODeqFUVkGDJSPP%40nathan
Backpatch-through: 18
This commit is contained in:
@@ -934,12 +934,16 @@ vacuum threshold = Minimum(vacuum max threshold, vacuum base threshold + vacuum
|
|||||||
The table is also vacuumed if the number of tuples inserted since the last
|
The table is also vacuumed if the number of tuples inserted since the last
|
||||||
vacuum has exceeded the defined insert threshold, which is defined as:
|
vacuum has exceeded the defined insert threshold, which is defined as:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
vacuum insert threshold = vacuum base insert threshold + vacuum insert scale factor * number of tuples
|
vacuum insert threshold = vacuum base insert threshold + vacuum insert scale factor * number of tuples * percent of table not frozen
|
||||||
</programlisting>
|
</programlisting>
|
||||||
where the vacuum insert base threshold is
|
where the vacuum insert base threshold is
|
||||||
<xref linkend="guc-autovacuum-vacuum-insert-threshold"/>,
|
<xref linkend="guc-autovacuum-vacuum-insert-threshold"/>,
|
||||||
and vacuum insert scale factor is
|
the vacuum insert scale factor is
|
||||||
<xref linkend="guc-autovacuum-vacuum-insert-scale-factor"/>.
|
<xref linkend="guc-autovacuum-vacuum-insert-scale-factor"/>,
|
||||||
|
the number of tuples is
|
||||||
|
<structname>pg_class</structname>.<structfield>reltuples</structfield>,
|
||||||
|
and the percent of the table not frozen is
|
||||||
|
<literal>1 - pg_class.relallfrozen / pg_class.relpages</literal>.
|
||||||
Such vacuums may allow portions of the table to be marked as
|
Such vacuums may allow portions of the table to be marked as
|
||||||
<firstterm>all visible</firstterm> and also allow tuples to be frozen, which
|
<firstterm>all visible</firstterm> and also allow tuples to be frozen, which
|
||||||
can reduce the work required in subsequent vacuums.
|
can reduce the work required in subsequent vacuums.
|
||||||
|
|||||||
Reference in New Issue
Block a user