public inbox for [email protected]
help / color / mirror / Atom feedFrom: Michael Paquier <[email protected]>
To: Sami Imseih <[email protected]>
Cc: Baji Shaik <[email protected]>
Cc: Tristan Partin <[email protected]>
Cc: [email protected]
Cc: [email protected]
Subject: Re: [PATCH] Fix memory leak in pgstat_progress_parallel_incr_param()
Date: Mon, 8 Jun 2026 12:44:05 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAA5RZ0sb06bJecz1=0GtM69hO9HarCD_1+m0YOmyZ_PpEs_M6Q@mail.gmail.com>
References: <CA+fm-RMopta1Dmq8udiU5sp+zwTvhUf4+xfbr3rZDfczH+p-xw@mail.gmail.com>
<[email protected]>
<CA+fm-RMwUuX7SimgfHZ1o3=RYWQT7wC+KC2+uAgbPqHij25mug@mail.gmail.com>
<CAA5RZ0sb06bJecz1=0GtM69hO9HarCD_1+m0YOmyZ_PpEs_M6Q@mail.gmail.com>
On Sat, Jun 06, 2026 at 09:55:05AM -0500, Sami Imseih wrote:
> Hi,
>
> good find, and thanks for the patches!
>
> > 0001: drop the redundant initStringInfo() call (backport candidate)
>
> This one looks like an obvious fix to me.
And clearly something that should be backpatched down to v17, or we
could pile a lot of memory depending on how many calls we do in a
worker, with more piling over time.
Will process, thanks!
>> 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.
I doubt that 0002 is worth doing, particularly seeing the code paths
where this is called.
--
Michael
Attachments:
[application/pgp-signature] signature.asc (833B, 2-signature.asc)
download
view thread (6+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: [PATCH] Fix memory leak in pgstat_progress_parallel_incr_param()
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox