Re: Track the amount of time waiting due to cost_delay
Sergei Kornilov <sk@zsrv.org>
From: Sergei Kornilov <sk@zsrv.org>
To: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Cc: Dilip Kumar <dilipbalaut@gmail.com>, Masahiro Ikeda <ikedamsh@oss.nttdata.com>, "Imseih (AWS), Sami" <simseih@amazon.com>, Masahiko Sawada <sawada.mshk@gmail.com>, pgsql-hackers@lists.postgresql.org, Robert Haas <robertmhaas@gmail.com>, Nathan Bossart <nathandbossart@gmail.com>
Date: 2024-12-13T21:06:37Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add delay time to VACUUM/ANALYZE (VERBOSE) and autovacuum logs.
- 7720082ae532 18.0 landed
-
Add cost-based vacuum delay time to progress views.
- bb8dff9995f2 18.0 landed
-
Add is_analyze parameter to vacuum_delay_point().
- e5b0b0ce1509 18.0 landed
-
Refresh cost-based delay params more frequently in autovacuum
- 7d71d3dd080b 16.0 cited
Hello! +/* + * In case of parallel workers, the last time the delay has been reported to + * the leader. + * We assume this initializes to zero. + */ +static instr_time last_report_time; Maybe last_report_time would be better named worker_last_report_time? (It is not clear to me from the comment that the variable is not used by the leader or autovacuum worker at all) + /* Parallel worker */ + if (IsParallelWorker()) I think this comment doesn't add value (just repeats the code), maybe delete it? I was surprised that the patch does not add reporting for log_autovacuum_min_duration. But I see it was discussed earlier, great. (postponed for another topic&patch) - code looks good - docs pass (not a native English speaker) - check-world pass regards, Sergei