| From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
|---|---|
| To: | "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Fix stats reporting delays in logical parallel apply worker |
| Date: | 2026-04-20 08:23:47 |
| Message-ID: | CAA4eK1KbhbNQyhfWa8hMqbhD-6Q1Y91h+WyDVCL_Fct80Z=wxA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, Apr 17, 2026 at 12:49 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Fri, Apr 17, 2026 at 8:31 AM Zhijie Hou (Fujitsu)
> <houzj(dot)fnst(at)fujitsu(dot)com> wrote:
> >
> > When implementing another feature, I noticed that parallel apply workers
> > currently do not report statistics while idle in their main loop. This can cause
> > stats from the last processed transaction to be arbitrarily delayed, especially
> > when there are long gaps between streamed transactions.
> >
> > The issue is demonstrated in 0002, where a TAP test fails when attempting to
> > collect stats from a parallel apply worker that has no subsequent transaction to
> > trigger a stats report.
> >
> > 0001 fixes this issue by forcing a stats report when the worker is idle in the
> > main loop, matching the behavior already present in LogicalRepApplyLoop() for
> > regular logical apply workers.
> >
>
> LGTM. We should backpatch this change.
>
Pushed now.
--
With Regards,
Amit Kapila.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Daniel Gustafsson | 2026-04-20 08:26:22 | Re: [PATCH] Reject ENCODING option for COPY TO FORMAT JSON |
| Previous Message | Richard Guo | 2026-04-20 08:17:57 | Re: Clean up remove_rel_from_query() after self-join elimination commit |