Configuration parameter

track_cost_delay_timing — PostgreSQL configuration parameter

Category Run-time Statistics

Enables timing of cost-based vacuum delay (see runtime_config_resource_vacuum_cost).

At a glance

Property Value
Parameter track_cost_delay_timing
Category Run-time Statistics
Default (see documentation)
Value type boolean (on/off)
Change scope Per-session (SET)
Available in PostgreSQL 18, 19 (added in 18)

What it does

Enables timing of cost-based vacuum delay (see runtime_config_resource_vacuum_cost). This parameter is off by default, as it will repeatedly query the operating system for the current time, which may cause significant overhead on some platforms. You can use the pgtesttiming tool to measure the overhead of timing on your system. Cost-based vacuum delay timing information is displayed in pg_stat_progress_vacuum, pg_stat_progress_analyze, in the output of vacuum and analyze when the VERBOSE option is used, and by autovacuum for auto-vacuums and auto-analyzes when log_autovacuum_min_duration is set. Only superusers and users with the appropriate SET privilege can change this setting.

(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 track_cost_delay_timing; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'track_cost_delay_timing';.

Tuning guidance

This governs how much activity and timing data the server collects. Collecting more improves visibility in pg_stat_* views and monitoring but adds a little overhead; collecting less is cheaper but blinds your tooling. Enable the tracking your monitoring actually consumes and leave the rest at default.

Reference

PostgreSQL documentation — track_cost_delay_timing.

Keep going

Related & next steps

Was this helpful?

← All configuration parameters