Re: Track the amount of time waiting due to cost_delay

From: Sergei Kornilov <sk(at)zsrv(dot)org>
To: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Cc: Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Masahiro Ikeda <ikedamsh(at)oss(dot)nttdata(dot)com>, "Imseih (AWS), Sami" <simseih(at)amazon(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Robert Haas <robertmhaas(at)gmail(dot)com>, Nathan Bossart <nathandbossart(at)gmail(dot)com>
Subject: Re: Track the amount of time waiting due to cost_delay
Date: 2024-12-13 21:06:37
Message-ID: 16915281734123997@tlzfnq74f336m6wy.iva.yp-c.yandex.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2024-12-13 22:26:22 Re: bt_index_parent_check and concurrently build indexes
Previous Message Andres Freund 2024-12-13 20:55:42 Re: checkpointer: PANIC: could not fsync file: No such file or directory