# autovacuum_naptime

> autovacuum_naptime — Time to sleep between autovacuum runs. Observed in PG9.0–19 Beta 3; its last measured boot default is 1 min 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:** “Time to sleep between autovacuum runs.”

## Identity {#identity}

| Field | Value | Meaning |
| --- | --- | --- |
| Type | `integer` | Upstream pg_settings type |
| Context | `sighup` | Takes effect after configuration reload |
| Unit | `s` | Raw unit |
| Range | `1` – `2147483` | Raw limits in the last observed version |
| Enum values | — | — for non-enum types |
| Category | Vacuuming / Automatic Vacuuming | Upstream classification |
| Latest boot value | `60` | 1 min |
{.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 | `60` | `s` | 1 min |
{.full-width caption="Measured PG9.0–19 Beta 3 boot defaults"}

## How it works {#mechanism}

Time to sleep between autovacuum runs. A configuration reload applies a new value; existing work already in flight is not retroactively changed.

The launcher aims to start work in each database once per interval; with N databases, launch attempts are spread at roughly naptime/N. It is not a fixed per-table polling period, and worker availability plus long-running jobs can add delay.

Monitor and change autovacuum_naptime together with autovacuum, autovacuum_max_workers, autovacuum_worker_slots. 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_naptime 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 | `1min` | same as boot | `1min` |
| OLAP | `1min` | same as boot | `1min` |
| CRIT | `1min` | same as boot | `1min` |
| TINY | `1min` | same as boot | `1min` |
{.full-width}

> [!CAUTION]
> **Advice — pending human review.** Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 = 1min (dcs); OLAP: PG9.0–19 Beta 3 = 1min (dcs); CRIT: PG9.0–19 Beta 3 = 1min (dcs); TINY: PG9.0–19 Beta 3 = 1min (dcs). Advice, pending human review — Editorial interpretation, pending human maintainer review: the override appears intended to retain PostgreSQL's one-minute database scheduling cadence explicitly; 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}

[`autovacuum`](/parameters/autovacuum/) · [`autovacuum_max_workers`](/parameters/autovacuum-max-workers/) · [`autovacuum_worker_slots`](/parameters/autovacuum-worker-slots/) · [`autovacuum_work_mem`](/parameters/autovacuum-work-mem/) · [`track_counts`](/parameters/track-counts/) · [`autovacuum_analyze_scale_factor`](/parameters/autovacuum-analyze-scale-factor/)

## References {#references}

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