Re: [PATCH] Fix memory leak in pgstat_progress_parallel_incr_param()
Baji Shaik <baji.pgdev@gmail.com>
From: Baji Shaik <baji.pgdev@gmail.com>
To: Sami Imseih <samimseih@gmail.com>
Cc: Tristan Partin <tristan@partin.io>, bertranddrouvot.pg@gmail.com, pgsql-hackers@lists.postgresql.org
Date: 2026-06-06T16:04:32Z
Lists: pgsql-hackers
Attachments
- v3-0001-Fix-memory-leak-in-pgstat_progress_parallel_incr_.patch (application/octet-stream) patch v3-0001
On Sat, Jun 6, 2026 at 9:55 AM Sami Imseih <samimseih@gmail.com> wrote: > > 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 the added complexity. Dropping 0002. v3 attached (just 0001, unchanged from previous). Thanks, Baji Shaik.
Commits
-
Fix memory leak in pgstat_progress_parallel_incr_param()
- 8ad4148313d4 17 (unreleased) landed
- 4154a1482063 18 (unreleased) landed
- b20c952ce703 19 (unreleased) landed