Skip to content

Commit b07642d

Browse files
committed
Trigger autovacuum based on number of INSERTs
Traditionally autovacuum has only ever invoked a worker based on the estimated number of dead tuples in a table and for anti-wraparound purposes. For the latter, with certain classes of tables such as insert-only tables, anti-wraparound vacuums could be the first vacuum that the table ever receives. This could often lead to autovacuum workers being busy for extended periods of time due to having to potentially freeze every page in the table. This could be particularly bad for very large tables. New clusters, or recently pg_restored clusters could suffer even more as many large tables may have the same relfrozenxid, which could result in large numbers of tables requiring an anti-wraparound vacuum all at once. Here we aim to reduce the work required by anti-wraparound and aggressive vacuums in general, by triggering autovacuum when the table has received enough INSERTs. This is controlled by adding two new GUCs and reloptions; autovacuum_vacuum_insert_threshold and autovacuum_vacuum_insert_scale_factor. These work exactly the same as the existing scale factor and threshold controls, only base themselves off the number of inserts since the last vacuum, rather than the number of dead tuples. New controls were added rather than reusing the existing controls, to allow these new vacuums to be tuned independently and perhaps even completely disabled altogether, which can be done by setting autovacuum_vacuum_insert_threshold to -1. We make no attempt to skip index cleanup operations on these vacuums as they may trigger for an insert-mostly table which continually doesn't have enough dead tuples to trigger an autovacuum for the purpose of removing those dead tuples. If we were to skip cleaning the indexes in this case, then it is possible for the index(es) to become bloated over time. There are additional benefits to triggering autovacuums based on inserts, as tables which never contain enough dead tuples to trigger an autovacuum are now more likely to receive a vacuum, which can mark more of the table as "allvisible" and encourage the query planner to make use of Index Only Scans. Currently, we still obey vacuum_freeze_min_age when triggering these new autovacuums based on INSERTs. For large insert-only tables, it may be beneficial to lower the table's autovacuum_freeze_min_age so that tuples are eligible to be frozen sooner. Here we've opted not to zero that for these types of vacuums, since the table may just be insert-mostly and we may otherwise freeze tuples that are still destined to be updated or removed in the near future. There was some debate to what exactly the new scale factor and threshold should default to. For now, these are set to 0.2 and 1000, respectively. There may be some motivation to adjust these before the release. Author: Laurenz Albe, Darafei Praliaskouski Reviewed-by: Alvaro Herrera, Masahiko Sawada, Chris Travers, Andres Freund, Justin Pryzby Discussion: https://postgr.es/m/CAC8Q8t%2Bj36G_bLF%3D%2B0iMo6jGNWnLnWb1tujXuJr-%2Bx8ZCCTqoQ%40mail.gmail.com
1 parent 9945ad6 commit b07642d

File tree

18 files changed

+230
-12
lines changed

18 files changed

+230
-12
lines changed

doc/src/sgml/config.sgml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7313,6 +7313,28 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
73137313
</listitem>
73147314
</varlistentry>
73157315

7316+
<varlistentry id="guc-autovacuum-vacuum-insert-threshold" xreflabel="autovacuum_vacuum_insert_threshold">
7317+
<term><varname>autovacuum_vacuum_insert_threshold</varname> (<type>integer</type>)
7318+
<indexterm>
7319+
<primary><varname>autovacuum_vacuum_insert_threshold</varname></primary>
7320+
<secondary>configuration parameter</secondary>
7321+
</indexterm>
7322+
</term>
7323+
<listitem>
7324+
<para>
7325+
Specifies the number of inserted tuples needed to trigger a
7326+
<command>VACUUM</command> in any one table.
7327+
The default is 1000 tuples. If -1 is specified, autovacuum will not
7328+
trigger a <command>VACUUM</command> operation on any tables based on
7329+
the number of inserts.
7330+
This parameter can only be set in the <filename>postgresql.conf</filename>
7331+
file or on the server command line;
7332+
but the setting can be overridden for individual tables by
7333+
changing table storage parameters.
7334+
</para>
7335+
</listitem>
7336+
</varlistentry>
7337+
73167338
<varlistentry id="guc-autovacuum-analyze-threshold" xreflabel="autovacuum_analyze_threshold">
73177339
<term><varname>autovacuum_analyze_threshold</varname> (<type>integer</type>)
73187340
<indexterm>
@@ -7354,6 +7376,27 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
73547376
</listitem>
73557377
</varlistentry>
73567378

7379+
<varlistentry id="guc-autovacuum-vacuum-insert-scale-factor" xreflabel="autovacuum_vacuum_insert_scale_factor">
7380+
<term><varname>autovacuum_vacuum_insert_scale_factor</varname> (<type>floating point</type>)
7381+
<indexterm>
7382+
<primary><varname>autovacuum_vacuum_insert_scale_factor</varname></primary>
7383+
<secondary>configuration parameter</secondary>
7384+
</indexterm>
7385+
</term>
7386+
<listitem>
7387+
<para>
7388+
Specifies a fraction of the table size to add to
7389+
<varname>autovacuum_vacuum_insert_threshold</varname>
7390+
when deciding whether to trigger a <command>VACUUM</command>.
7391+
The default is 0.2 (20% of table size).
7392+
This parameter can only be set in the <filename>postgresql.conf</filename>
7393+
file or on the server command line;
7394+
but the setting can be overridden for individual tables by
7395+
changing table storage parameters.
7396+
</para>
7397+
</listitem>
7398+
</varlistentry>
7399+
73577400
<varlistentry id="guc-autovacuum-analyze-scale-factor" xreflabel="autovacuum_analyze_scale_factor">
73587401
<term><varname>autovacuum_analyze_scale_factor</varname> (<type>floating point</type>)
73597402
<indexterm>

doc/src/sgml/maintenance.sgml

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -777,13 +777,33 @@ vacuum threshold = vacuum base threshold + vacuum scale factor * number of tuple
777777
<xref linkend="guc-autovacuum-vacuum-scale-factor"/>,
778778
and the number of tuples is
779779
<structname>pg_class</structname>.<structfield>reltuples</structfield>.
780-
The number of obsolete tuples is obtained from the statistics
781-
collector; it is a semi-accurate count updated by each
782-
<command>UPDATE</command> and <command>DELETE</command> operation. (It
783-
is only semi-accurate because some information might be lost under heavy
784-
load.) If the <structfield>relfrozenxid</structfield> value of the table is more
785-
than <varname>vacuum_freeze_table_age</varname> transactions old, an aggressive
786-
vacuum is performed to freeze old tuples and advance
780+
</para>
781+
782+
<para>
783+
The table is also vacuumed if the number of tuples inserted since the last
784+
vacuum has exceeded the defined insert threshold, which is defined as:
785+
<programlisting>
786+
vacuum insert threshold = vacuum base insert threshold + vacuum insert scale factor * number of tuples
787+
</programlisting>
788+
where the vacuum insert base threshold is
789+
<xref linkend="guc-autovacuum-vacuum-insert-threshold"/>,
790+
and vacuum insert scale factor is
791+
<xref linkend="guc-autovacuum-vacuum-insert-scale-factor"/>.
792+
Such vacuums may allow portions of the table to be marked as
793+
<firstterm>all visible</firstterm> and also allow tuples to be frozen, which
794+
can reduce the work required in subsequent vacuums.
795+
For tables which receive <command>INSERT</command> operations but no or
796+
almost no <command>UPDATE</command>/<command>DELETE</command> operations,
797+
it may be beneficial to lower the table's
798+
<xref linkend="reloption-autovacuum-freeze-min-age"/> as this may allow
799+
tuples to be frozen by earlier vacuums. The number of obsolete tuples and
800+
the number of inserted tuples are obtained from the statistics collector;
801+
it is a semi-accurate count updated by each <command>UPDATE</command>,
802+
<command>DELETE</command> and <command>INSERT</command> operation. (It is
803+
only semi-accurate because some information might be lost under heavy
804+
load.) If the <structfield>relfrozenxid</structfield> value of the table
805+
is more than <varname>vacuum_freeze_table_age</varname> transactions old,
806+
an aggressive vacuum is performed to freeze old tuples and advance
787807
<structfield>relfrozenxid</structfield>; otherwise, only pages that have been modified
788808
since the last vacuum are scanned.
789809
</para>

doc/src/sgml/monitoring.sgml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2861,6 +2861,11 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
28612861
<entry><type>bigint</type></entry>
28622862
<entry>Estimated number of rows modified since this table was last analyzed</entry>
28632863
</row>
2864+
<row>
2865+
<entry><structfield>n_ins_since_vacuum</structfield></entry>
2866+
<entry><type>bigint</type></entry>
2867+
<entry>Estimated number of rows inserted since this table was last vacuumed</entry>
2868+
</row>
28642869
<row>
28652870
<entry><structfield>last_vacuum</structfield></entry>
28662871
<entry><type>timestamp with time zone</type></entry>

doc/src/sgml/ref/create_table.sgml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,6 +1475,36 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
14751475
</listitem>
14761476
</varlistentry>
14771477

1478+
<varlistentry id="reloption-autovacuum-vacuum-insert-threshold" xreflabel="autovacuum_vacuum_insert_threshold">
1479+
<term><literal>autovacuum_vacuum_insert_threshold</literal>, <literal>toast.autovacuum_vacuum_insert_threshold</literal> (<type>integer</type>)
1480+
<indexterm>
1481+
<primary><varname>autovacuum_vacuum_insert_threshold</varname></primary>
1482+
<secondary>storage parameter</secondary>
1483+
</indexterm>
1484+
</term>
1485+
<listitem>
1486+
<para>
1487+
Per-table value for <xref linkend="guc-autovacuum-vacuum-insert-threshold"/>
1488+
parameter. The special value of -1 may be used to disable insert vacuums on the table.
1489+
</para>
1490+
</listitem>
1491+
</varlistentry>
1492+
1493+
<varlistentry id="reloption-autovacuum-vacuum-insert-scale-factor" xreflabel="autovacuum_vacuum_insert_scale_factor">
1494+
<term><literal>autovacuum_vacuum_insert_scale_factor</literal>, <literal>toast.autovacuum_vacuum_insert_scale_factor</literal> (<type>float4</type>)
1495+
<indexterm>
1496+
<primary><varname>autovacuum_vacuum_insert_scale_factor</varname> </primary>
1497+
<secondary>storage parameter</secondary>
1498+
</indexterm>
1499+
</term>
1500+
<listitem>
1501+
<para>
1502+
Per-table value for <xref linkend="guc-autovacuum-vacuum-insert-scale-factor"/>
1503+
parameter.
1504+
</para>
1505+
</listitem>
1506+
</varlistentry>
1507+
14781508
<varlistentry id="reloption-autovacuum-analyze-threshold" xreflabel="autovacuum_analyze_threshold">
14791509
<term><literal>autovacuum_analyze_threshold</literal> (<type>integer</type>)
14801510
<indexterm>

src/backend/access/common/reloptions.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,15 @@ static relopt_int intRelOpts[] =
233233
},
234234
-1, 0, INT_MAX
235235
},
236+
{
237+
{
238+
"autovacuum_vacuum_insert_threshold",
239+
"Minimum number of tuple inserts prior to vacuum, or -1 to disable insert vacuums",
240+
RELOPT_KIND_HEAP | RELOPT_KIND_TOAST,
241+
ShareUpdateExclusiveLock
242+
},
243+
-2, -1, INT_MAX
244+
},
236245
{
237246
{
238247
"autovacuum_analyze_threshold",
@@ -398,6 +407,15 @@ static relopt_real realRelOpts[] =
398407
},
399408
-1, 0.0, 100.0
400409
},
410+
{
411+
{
412+
"autovacuum_vacuum_insert_scale_factor",
413+
"Number of tuple inserts prior to vacuum as a fraction of reltuples",
414+
RELOPT_KIND_HEAP | RELOPT_KIND_TOAST,
415+
ShareUpdateExclusiveLock
416+
},
417+
-1, 0.0, 100.0
418+
},
401419
{
402420
{
403421
"autovacuum_analyze_scale_factor",
@@ -1514,6 +1532,8 @@ default_reloptions(Datum reloptions, bool validate, relopt_kind kind)
15141532
offsetof(StdRdOptions, autovacuum) + offsetof(AutoVacOpts, enabled)},
15151533
{"autovacuum_vacuum_threshold", RELOPT_TYPE_INT,
15161534
offsetof(StdRdOptions, autovacuum) + offsetof(AutoVacOpts, vacuum_threshold)},
1535+
{"autovacuum_vacuum_insert_threshold", RELOPT_TYPE_INT,
1536+
offsetof(StdRdOptions, autovacuum) + offsetof(AutoVacOpts, vacuum_ins_threshold)},
15171537
{"autovacuum_analyze_threshold", RELOPT_TYPE_INT,
15181538
offsetof(StdRdOptions, autovacuum) + offsetof(AutoVacOpts, analyze_threshold)},
15191539
{"autovacuum_vacuum_cost_limit", RELOPT_TYPE_INT,
@@ -1538,6 +1558,8 @@ default_reloptions(Datum reloptions, bool validate, relopt_kind kind)
15381558
offsetof(StdRdOptions, autovacuum) + offsetof(AutoVacOpts, vacuum_cost_delay)},
15391559
{"autovacuum_vacuum_scale_factor", RELOPT_TYPE_REAL,
15401560
offsetof(StdRdOptions, autovacuum) + offsetof(AutoVacOpts, vacuum_scale_factor)},
1561+
{"autovacuum_vacuum_insert_scale_factor", RELOPT_TYPE_REAL,
1562+
offsetof(StdRdOptions, autovacuum) + offsetof(AutoVacOpts, vacuum_ins_scale_factor)},
15411563
{"autovacuum_analyze_scale_factor", RELOPT_TYPE_REAL,
15421564
offsetof(StdRdOptions, autovacuum) + offsetof(AutoVacOpts, analyze_scale_factor)},
15431565
{"user_catalog_table", RELOPT_TYPE_BOOL,

src/backend/catalog/system_views.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,7 @@ CREATE VIEW pg_stat_all_tables AS
573573
pg_stat_get_live_tuples(C.oid) AS n_live_tup,
574574
pg_stat_get_dead_tuples(C.oid) AS n_dead_tup,
575575
pg_stat_get_mod_since_analyze(C.oid) AS n_mod_since_analyze,
576+
pg_stat_get_ins_since_vacuum(C.oid) AS n_ins_since_vacuum,
576577
pg_stat_get_last_vacuum_time(C.oid) as last_vacuum,
577578
pg_stat_get_last_autovacuum_time(C.oid) as last_autovacuum,
578579
pg_stat_get_last_analyze_time(C.oid) as last_analyze,

src/backend/postmaster/autovacuum.c

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ int autovacuum_work_mem = -1;
117117
int autovacuum_naptime;
118118
int autovacuum_vac_thresh;
119119
double autovacuum_vac_scale;
120+
int autovacuum_vac_ins_thresh;
121+
double autovacuum_vac_ins_scale;
120122
int autovacuum_anl_thresh;
121123
double autovacuum_anl_scale;
122124
int autovacuum_freeze_max_age;
@@ -2969,16 +2971,20 @@ relation_needs_vacanalyze(Oid relid,
29692971

29702972
/* constants from reloptions or GUC variables */
29712973
int vac_base_thresh,
2974+
vac_ins_base_thresh,
29722975
anl_base_thresh;
29732976
float4 vac_scale_factor,
2977+
vac_ins_scale_factor,
29742978
anl_scale_factor;
29752979

29762980
/* thresholds calculated from above constants */
29772981
float4 vacthresh,
2982+
vacinsthresh,
29782983
anlthresh;
29792984

29802985
/* number of vacuum (resp. analyze) tuples at this time */
29812986
float4 vactuples,
2987+
instuples,
29822988
anltuples;
29832989

29842990
/* freeze parameters */
@@ -3005,6 +3011,15 @@ relation_needs_vacanalyze(Oid relid,
30053011
? relopts->vacuum_threshold
30063012
: autovacuum_vac_thresh;
30073013

3014+
vac_ins_scale_factor = (relopts && relopts->vacuum_ins_scale_factor >= 0)
3015+
? relopts->vacuum_ins_scale_factor
3016+
: autovacuum_vac_ins_scale;
3017+
3018+
/* -1 is used to disable insert vacuums */
3019+
vac_ins_base_thresh = (relopts && relopts->vacuum_ins_threshold >= -1)
3020+
? relopts->vacuum_ins_threshold
3021+
: autovacuum_vac_ins_thresh;
3022+
30083023
anl_scale_factor = (relopts && relopts->analyze_scale_factor >= 0)
30093024
? relopts->analyze_scale_factor
30103025
: autovacuum_anl_scale;
@@ -3059,22 +3074,30 @@ relation_needs_vacanalyze(Oid relid,
30593074
{
30603075
reltuples = classForm->reltuples;
30613076
vactuples = tabentry->n_dead_tuples;
3077+
instuples = tabentry->inserts_since_vacuum;
30623078
anltuples = tabentry->changes_since_analyze;
30633079

30643080
vacthresh = (float4) vac_base_thresh + vac_scale_factor * reltuples;
3081+
vacinsthresh = (float4) vac_ins_base_thresh + vac_ins_scale_factor * reltuples;
30653082
anlthresh = (float4) anl_base_thresh + anl_scale_factor * reltuples;
30663083

30673084
/*
30683085
* Note that we don't need to take special consideration for stat
30693086
* reset, because if that happens, the last vacuum and analyze counts
30703087
* will be reset too.
30713088
*/
3072-
elog(DEBUG3, "%s: vac: %.0f (threshold %.0f), anl: %.0f (threshold %.0f)",
3073-
NameStr(classForm->relname),
3074-
vactuples, vacthresh, anltuples, anlthresh);
3089+
if (vac_ins_base_thresh >= 0)
3090+
elog(DEBUG3, "%s: vac: %.0f (threshold %.0f), ins: %.0f (threshold %.0f), anl: %.0f (threshold %.0f)",
3091+
NameStr(classForm->relname),
3092+
vactuples, vacthresh, instuples, vacinsthresh, anltuples, anlthresh);
3093+
else
3094+
elog(DEBUG3, "%s: vac: %.0f (threshold %.0f), ins: (disabled), anl: %.0f (threshold %.0f)",
3095+
NameStr(classForm->relname),
3096+
vactuples, vacthresh, anltuples, anlthresh);
30753097

30763098
/* Determine if this table needs vacuum or analyze. */
3077-
*dovacuum = force_vacuum || (vactuples > vacthresh);
3099+
*dovacuum = force_vacuum || (vactuples > vacthresh) ||
3100+
(vac_ins_base_thresh >= 0 && instuples > vacinsthresh);
30783101
*doanalyze = (anltuples > anlthresh);
30793102
}
30803103
else

src/backend/postmaster/pgstat.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4701,6 +4701,7 @@ pgstat_get_tab_entry(PgStat_StatDBEntry *dbentry, Oid tableoid, bool create)
47014701
result->n_live_tuples = 0;
47024702
result->n_dead_tuples = 0;
47034703
result->changes_since_analyze = 0;
4704+
result->inserts_since_vacuum = 0;
47044705
result->blocks_fetched = 0;
47054706
result->blocks_hit = 0;
47064707
result->vacuum_timestamp = 0;
@@ -5831,6 +5832,7 @@ pgstat_recv_tabstat(PgStat_MsgTabstat *msg, int len)
58315832
tabentry->n_live_tuples = tabmsg->t_counts.t_delta_live_tuples;
58325833
tabentry->n_dead_tuples = tabmsg->t_counts.t_delta_dead_tuples;
58335834
tabentry->changes_since_analyze = tabmsg->t_counts.t_changed_tuples;
5835+
tabentry->inserts_since_vacuum = tabmsg->t_counts.t_tuples_inserted;
58345836
tabentry->blocks_fetched = tabmsg->t_counts.t_blocks_fetched;
58355837
tabentry->blocks_hit = tabmsg->t_counts.t_blocks_hit;
58365838

@@ -5860,10 +5862,12 @@ pgstat_recv_tabstat(PgStat_MsgTabstat *msg, int len)
58605862
{
58615863
tabentry->n_live_tuples = 0;
58625864
tabentry->n_dead_tuples = 0;
5865+
tabentry->inserts_since_vacuum = 0;
58635866
}
58645867
tabentry->n_live_tuples += tabmsg->t_counts.t_delta_live_tuples;
58655868
tabentry->n_dead_tuples += tabmsg->t_counts.t_delta_dead_tuples;
58665869
tabentry->changes_since_analyze += tabmsg->t_counts.t_changed_tuples;
5870+
tabentry->inserts_since_vacuum += tabmsg->t_counts.t_tuples_inserted;
58675871
tabentry->blocks_fetched += tabmsg->t_counts.t_blocks_fetched;
58685872
tabentry->blocks_hit += tabmsg->t_counts.t_blocks_hit;
58695873
}
@@ -6098,6 +6102,18 @@ pgstat_recv_vacuum(PgStat_MsgVacuum *msg, int len)
60986102
tabentry->n_live_tuples = msg->m_live_tuples;
60996103
tabentry->n_dead_tuples = msg->m_dead_tuples;
61006104

6105+
/*
6106+
* It is quite possible that a non-aggressive VACUUM ended up skipping
6107+
* various pages, however, we'll zero the insert counter here regardless.
6108+
* It's currently used only to track when we need to perform an
6109+
* "insert" autovacuum, which are mainly intended to freeze newly inserted
6110+
* tuples. Zeroing this may just mean we'll not try to vacuum the table
6111+
* again until enough tuples have been inserted to trigger another insert
6112+
* autovacuum. An anti-wraparound autovacuum will catch any persistent
6113+
* stragglers.
6114+
*/
6115+
tabentry->inserts_since_vacuum = 0;
6116+
61016117
if (msg->m_autovacuum)
61026118
{
61036119
tabentry->autovac_vacuum_timestamp = msg->m_vacuumtime;

src/backend/utils/adt/pgstatfuncs.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,22 @@ pg_stat_get_mod_since_analyze(PG_FUNCTION_ARGS)
196196
}
197197

198198

199+
Datum
200+
pg_stat_get_ins_since_vacuum(PG_FUNCTION_ARGS)
201+
{
202+
Oid relid = PG_GETARG_OID(0);
203+
int64 result;
204+
PgStat_StatTabEntry *tabentry;
205+
206+
if ((tabentry = pgstat_fetch_stat_tabentry(relid)) == NULL)
207+
result = 0;
208+
else
209+
result = (int64) (tabentry->inserts_since_vacuum);
210+
211+
PG_RETURN_INT64(result);
212+
}
213+
214+
199215
Datum
200216
pg_stat_get_blocks_fetched(PG_FUNCTION_ARGS)
201217
{

src/backend/utils/misc/guc.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3102,6 +3102,15 @@ static struct config_int ConfigureNamesInt[] =
31023102
50, 0, INT_MAX,
31033103
NULL, NULL, NULL
31043104
},
3105+
{
3106+
{"autovacuum_vacuum_insert_threshold", PGC_SIGHUP, AUTOVACUUM,
3107+
gettext_noop("Minimum number of tuple inserts prior to vacuum, or -1 to disable insert vacuums"),
3108+
NULL
3109+
},
3110+
&autovacuum_vac_ins_thresh,
3111+
1000, -1, INT_MAX,
3112+
NULL, NULL, NULL
3113+
},
31053114
{
31063115
{"autovacuum_analyze_threshold", PGC_SIGHUP, AUTOVACUUM,
31073116
gettext_noop("Minimum number of tuple inserts, updates, or deletes prior to analyze."),
@@ -3549,6 +3558,17 @@ static struct config_real ConfigureNamesReal[] =
35493558
0.2, 0.0, 100.0,
35503559
NULL, NULL, NULL
35513560
},
3561+
3562+
{
3563+
{"autovacuum_vacuum_insert_scale_factor", PGC_SIGHUP, AUTOVACUUM,
3564+
gettext_noop("Number of tuple inserts prior to vacuum as a fraction of reltuples."),
3565+
NULL
3566+
},
3567+
&autovacuum_vac_ins_scale,
3568+
0.2, 0.0, 100.0,
3569+
NULL, NULL, NULL
3570+
},
3571+
35523572
{
35533573
{"autovacuum_analyze_scale_factor", PGC_SIGHUP, AUTOVACUUM,
35543574
gettext_noop("Number of tuple inserts, updates, or deletes prior to analyze as a fraction of reltuples."),

0 commit comments

Comments
 (0)