agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Amit Kapila <akapila@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Flush statistics during idle periods in parallel apply worker.
Date: Mon, 20 Apr 2026 05:07:52 +0000
Message-ID: <E1wEgrP-001oLg-29@gemulon.postgresql.org> (raw)
Flush statistics during idle periods in parallel apply worker.
Parallel apply workers previously failed to report statistics while
waiting for new work in the main loop. This resulted in the stats from the
most recent transaction remaining unbuffered, leading to arbitrary
reporting delays—particularly when streamed transactions were infrequent.
This commit ensures that statistics are explicitly flushed when the worker
is idle, providing timely visibility into accumulated worker activity.
Author: Zhijie Hou <houzj.fnst@fujitsu.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Backpatch-through: 16, where it was introduced
Discussion: https://postgr.es/m/TYRPR01MB1419579F217CC4332B615589594202@TYRPR01MB14195.jpnprd01.prod.outlook.com
Branch
------
REL_17_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/88d7fdcc9aaa065daf10ff3b777f607fe65bdc02
Modified Files
--------------
src/backend/replication/logical/applyparallelworker.c | 9 +++++++++
1 file changed, 9 insertions(+)
view thread (4+ messages) latest in thread
Message-ID: <E1wEgrP-001oLg-29@gemulon.postgresql.org>
Permalink: ../E1wEgrP-001oLg-29@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1wEgrP-001oLg-29@gemulon.postgresql.org
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: pgsql-committers@postgresql.org
Cc: akapila@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Flush statistics during idle periods in parallel apply worker.
In-Reply-To: <E1wEgrP-001oLg-29@gemulon.postgresql.org>
* 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