# autovacuum_vacuum_cost_limit

> autovacuum_vacuum_cost_limit — Vacuum cost amount available before napping, for autovacuum. Observed in PG9.0–19 Beta 3; its last measured boot default is -1 in PG19 Beta 3, with sighup context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA.
---

> [!NOTE]
> **Fact — official short description:** “Vacuum cost amount available before napping, for autovacuum.”

## Identity {#identity}

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

## Lifecycle {#lifecycle}

| Fact | Value |
| --- | --- |
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |

## Default history {#default-history}

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

## How it works {#mechanism}

Vacuum cost amount available before napping, for autovacuum. A configuration reload applies a new value; existing work already in flight is not retroactively changed.

These values govern cost throttling for autovacuum workers; -1 inherits vacuum_cost_delay or vacuum_cost_limit respectively. With multiple active workers, the autovacuum cost budget is balanced among them, so a per-worker reading is not simply multiplied by concurrency.

Monitor and change autovacuum_vacuum_cost_limit together with vacuum_cost_delay, vacuum_cost_limit, vacuum_cost_page_hit. 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_cost_limit from autovacuum duration, dead-tuple growth, and foreground I/O latency together. Prefer per-table overrides for hotspots; global throttling must not let cleanup fall permanently behind. |
| OLAP | During post-load windows, a larger budget or shorter delay can improve maintenance throughput, but verify that scans do not starve queries/imports. Failsafe activation means normal pacing already failed. |
| Small nodes | Keep conservative defaults. On slow disks, lowering concurrency or overriding one table is usually more controllable than making the delay arbitrarily large. |
{.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 | `-1` | same as boot | `-1` |
| OLAP | `-1` | same as boot | `-1` |
| CRIT | `-1` | same as boot | `-1` |
| TINY | `-1` | same as boot | `-1` |
{.full-width}

> [!CAUTION]
> **Advice — pending human review.** Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 = -1 (dcs); OLAP: PG9.0–19 Beta 3 = -1 (dcs); CRIT: PG9.0–19 Beta 3 = -1 (dcs); TINY: PG9.0–19 Beta 3 = -1 (dcs). Advice, pending human review — Editorial interpretation, pending human maintainer review: the override appears intended to delegate autovacuum's cost budget to vacuum_cost_limit via the -1 inheritance value; confirm it against the current Pigsty templates, hardware fixture, and operational guarantees before publication.

## 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}

[`vacuum_cost_delay`](/parameters/vacuum-cost-delay/) · [`vacuum_cost_limit`](/parameters/vacuum-cost-limit/) · [`vacuum_cost_page_hit`](/parameters/vacuum-cost-page-hit/) · [`vacuum_cost_page_miss`](/parameters/vacuum-cost-page-miss/) · [`vacuum_cost_page_dirty`](/parameters/vacuum-cost-page-dirty/) · [`autovacuum_vacuum_cost_delay`](/parameters/autovacuum-vacuum-cost-delay/)

## References {#references}

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