Hi,

On 08/07/2026 19:37, Nikolay Samokhvalov wrote:
Concretely, I propose splitting:

1) 0001 (v3, attached): narrow fix for the walsender miscount,
intended as a back-patchable bug fix -- this is what's paging people
in production today. Rebased on current master; the TAP test now
also verifies that xact_commit does not change as a function of
decoded transactions (walsender shutdown has a small fixed
bookkeeping delta, handled via a control run).

2) 0002 (attached, draft): master-only implementation of option 3 --
count xact_commit/xact_rollback only for regular client backends --
plus a doc change defining both columns explicitly. It also removes
the now-redundant parallel argument from AtEOXact_PgStat() and
AtEOXact_PgStat_Database(), since parallel workers are background
workers and are excluded by the backend-type check. 0002 has no test
yet; if the definition is agreed on, I'll extend the new TAP test to
cover the autovacuum/walsender exclusion.

Thanks for submitting the v3 patch, I had a look.

The patch applies cleanly on master. As experiment I added the tests only from 0001 and as expected they failed, but with the patch applied they pass. So far so good.

While the approach in 0001 could be considered a bit "action at a distance" approach, a suitable structural solution is in 0002.

I agree with starting to count xact_commit/xact_rollback only for regular client backends. TBH I expected it works this way already. Indeed, 0002 needs tests.

I'll set it to Ready for Committer and am volunteering for adding the tests or any other aspect I can help with to progress this patch.

--
Thanks,
Mircea Cadariu

Reply via email to