| From: | Baji Shaik <baji(dot)pgdev(at)gmail(dot)com> |
|---|---|
| To: | Sami Imseih <samimseih(at)gmail(dot)com> |
| Cc: | Tristan Partin <tristan(at)partin(dot)io>, bertranddrouvot(dot)pg(at)gmail(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: [PATCH] Fix memory leak in pgstat_progress_parallel_incr_param() |
| Date: | 2026-06-06 16:04:32 |
| Message-ID: | CA+fm-RNJTNqMFEbk1Fib5i1261PYqJTJBbvNYjyyNqRNnPJjSQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Sat, Jun 6, 2026 at 9:55 AM Sami Imseih <samimseih(at)gmail(dot)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.
| Attachment | Content-Type | Size |
|---|---|---|
| v3-0001-Fix-memory-leak-in-pgstat_progress_parallel_incr_.patch | application/octet-stream | 1.5 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | 신성준 | 2026-06-06 16:25:25 | Re: Add wait events for server logging destination writes |
| Previous Message | Sami Imseih | 2026-06-06 14:55:05 | Re: [PATCH] Fix memory leak in pgstat_progress_parallel_incr_param() |