public inbox for [email protected]
help / color / mirror / Atom feedFrom: Sami Imseih <[email protected]>
To: 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: Sat, 6 Jun 2026 09:55:05 -0500
Message-ID: <CAA5RZ0sb06bJecz1=0GtM69hO9HarCD_1+m0YOmyZ_PpEs_M6Q@mail.gmail.com> (raw)
In-Reply-To: <CA+fm-RMwUuX7SimgfHZ1o3=RYWQT7wC+KC2+uAgbPqHij25mug@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>
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.
> 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.
--
Sami Imseih
Amazon Web Services (AWS)
view thread (6+ messages) latest in thread
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]
Subject: Re: [PATCH] Fix memory leak in pgstat_progress_parallel_incr_param()
In-Reply-To: <CAA5RZ0sb06bJecz1=0GtM69hO9HarCD_1+m0YOmyZ_PpEs_M6Q@mail.gmail.com>
* 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