Parameter · Vacuuming / Cost-Based Vacuum Delay
vacuum_cost_page_hit
Vacuum cost for a page found in the buffer cache.
- Default:
1 - Type: integer
- Range: 0 … 10000
- Applies: Session (any user)
In plain words
Each page VACUUM touches costs points. A page already in memory is cheap: 1 point.
For DBAs and operators
Part of the cost model with miss (2) and dirty (20). Rarely changed; adjust the limit/delay instead. Setting it to 0 makes cached pages free, which can make sense when all your data is in RAM and only writes matter.
VERBOSE output shows the mix: buffer usage: 265 hits, 0 reads, 4 dirtied, so the cost of that run was 265×1 + 0×2 + 4×20 = 345 points.
How to change it
Any user can change it for their session with SET.
See it in context
Related parameters
vacuum_cost_page_miss vacuum_cost_page_dirty vacuum_cost_limit