# autovacuum_vacuum_insert_threshold

> autovacuum_vacuum_insert_threshold sets the minimum number of tuple inserts prior to vacuum. It is a sighup setting present in PG13–18; the latest recorded boot default is 1000.
---

> [!NOTE]
> **Fact — official short description:** “Minimum number of tuple inserts prior to vacuum.”

## Identity {#identity}

| Field | Value | Meaning |
| --- | --- | --- |
| Type | `integer` | Upstream pg_settings type |
| Context | `sighup` | Takes effect after configuration reload |
| Unit | — | Raw unit |
| Range | `-1` – `2147483647` | Raw limits in the last observed version |
| Enum values | — | — for non-enum types |
| Category | Vacuuming / Automatic Vacuuming | Upstream classification |
| Latest boot value | `1000` | 1000 |
{.fields meta="-"}

## Lifecycle {#lifecycle}

| Fact | Value |
| --- | --- |
| First observed | PG13 |
| Present in | PG13–19 Beta 3 |
| Removed in | No |
| Introduction commit | [`b07642dbcd8d`](https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=b07642dbcd8d5de05f0ee1dbb72dd6760dd30436) — Trigger autovacuum based on number of INSERTs |
| Commit date | 2020-03-28 |
| Discussion | [thread 1](https://postgr.es/m/CAC8Q8t%2Bj36G_bLF%3D%2B0iMo6jGNWnLnWb1tujXuJr-%2Bx8ZCCTqoQ%40mail.gmail.com) |

## Default history {#default-history}

| Versions | Raw `boot_val` | Unit | Human value |
| --- | --- | --- | --- |
| PG13–19 Beta 3 | `1000` | — | 1000 |
{.full-width caption="Measured PG9.0–19 Beta 3 boot defaults"}

## How it works {#mechanism}

Minimum number of tuple inserts prior to vacuum. A configuration reload applies a new value; existing work already in flight is not retroactively changed.

For insert-heavy tables the trigger is the insert threshold plus insert scale factor times reltuples times the fraction not all-frozen. Such vacuuming can advance visibility/freeze state even without dead tuples and reduce later aggressive-vacuum work.

Monitor and change autovacuum_vacuum_insert_threshold together with autovacuum_vacuum_threshold, autovacuum_vacuum_scale_factor, autovacuum_vacuum_max_threshold. Validate on the relevant server role and real workload, then use its sighup context to choose session change, reload, or restart; a historical boot default is not the current effective value.

## Tuning advice {#tuning-advice}

> [!TIP]
> **Advice.** These are workload-specific starting points and must be validated with measurements.

| Workload | Guidance |
| --- | --- |
| OLTP | Tune autovacuum_vacuum_insert_threshold from table size, change rate, and maintenance SLA, using per-table thresholds for large/hot relations. Observe trigger intervals, dead tuples, and ANALYZE/VACUUM duration. |
| OLAP | Run explicit ANALYZE/VACUUM after bulk loads instead of waiting only for proportional triggers; plan freezing and visibility-map advancement separately for append-only partitions. |
| Small nodes | Start with upstream or the measured Pigsty matrix value. Fixed thresholds dominate on small tables; after changes, confirm worker and I/O headroom. |
{.full-width}

## Pigsty {#pigsty}

Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.

| Template | Effective value | Versus upstream boot | Source expression |
| --- | --- | --- | --- |
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
{.full-width}

> [!CAUTION]
> **Advice — pending human review.** Fact from the current Pigsty template projection: OLTP: PG13–19 Beta 3 unmodified; OLAP: PG13–19 Beta 3 unmodified; CRIT: PG13–19 Beta 3 unmodified; TINY: PG13–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

## Common pitfalls {#common-pitfalls}

- Changing the global value while a table storage parameter overrides it.
- Treating reltuples and cumulative change statistics as exact real-time counts.
- Blaming a threshold without checking long transactions, replication slots, and worker saturation.
- Buying short-term quiet by deferring maintenance until wraparound failsafe activates.

## Related parameters {#related-parameters}

[`autovacuum_vacuum_threshold`](/parameters/autovacuum-vacuum-threshold/) · [`autovacuum_vacuum_scale_factor`](/parameters/autovacuum-vacuum-scale-factor/) · [`autovacuum_vacuum_max_threshold`](/parameters/autovacuum-vacuum-max-threshold/) · [`autovacuum_vacuum_insert_scale_factor`](/parameters/autovacuum-vacuum-insert-scale-factor/) · [`autovacuum`](/parameters/autovacuum/) · [`autovacuum_analyze_scale_factor`](/parameters/autovacuum-analyze-scale-factor/)

## References {#references}

- [PostgreSQL 19 Beta 3 — autovacuum_vacuum_insert_threshold](https://www.postgresql.org/docs/19/runtime-config-vacuum.html#GUC-AUTOVACUUM-VACUUM-INSERT-THRESHOLD)
- [PostgreSQL 19 release notes](https://www.postgresql.org/docs/19/release-19.html)
- [Machine-readable GUC export](/data/guc.jsonl)
