The estimated cost for vacuuming a buffer found in the shared buffer cache.
At a glance
| Property | Value |
|---|---|
| Parameter | vacuum_cost_page_hit |
| Category | Vacuuming |
| Default | 1 |
| Value type | integer |
| Change scope | Per-session (SET) |
| Available in | PostgreSQL 12, 13, 14, 15, 16, 17, 18, 19 (added in 12) |
What it does
The estimated cost for vacuuming a buffer found in the shared buffer cache. It represents the cost to lock the buffer pool, lookup the shared hash table and scan the content of the page. The default value is 1.
(Description quoted from the official PostgreSQL documentation.)
How to apply a change
Can be set per session with SET, per role/database with ALTER ROLE/DATABASE ... SET, or globally in postgresql.conf.
Inspect the current value and source with SHOW vacuum_cost_page_hit; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'vacuum_cost_page_hit';.
Tuning guidance
Cost charged for a buffer hit during vacuum; effectively a fine-tuning knob behind vacuum_cost_limit. Leave at default unless modelling a very specific I/O profile.