> 0002: allocate the static buffer once per process via > pq_beginmessage_reuse / pq_endmessage_reuse, to avoid the > per-call allocation (master only)
I am less convinced this will have any benefits for the additional complexity. The callers of pgstat_progress_parallel_incr_param() are not frequent enough to make a measurable difference here. cost delay reporting for parallel workers is throttled by PARALLEL_VACUUM_DELAY_REPORT_INTERVAL_NS and index progress reporting does not happen very frequently either.
Thanks for the review, Sami.
Agreed, at those call frequencies the per-call palloc is not worth