Thread

  1. Re: xact_rollback spikes when logical walsender exits

    Nikolay Samokhvalov <nik@postgres.ai> — 2026-05-13T00:06:40Z

    On Mon, Apr 20, 2026 at 11:38 PM vignesh C <vignesh21@gmail.com> wrote:
    
    > Another approach could be to introduce a wrapper around
    > AbortCurrentTransaction(), for example
    > AbortCurrentTransactionWithoutUpdateStats(), that skips the
    > AtEOXact_PgStat() call in this case.
    > Thoughts?
    
    
    
    Thanks -- v2 attached, adopting your wrapper.
    
    One scope choice worth flagging: the wrapper suppresses only
    AtEOXact_PgStat_Database() (the DB-level xact_commit/xact_rollback
    counter), not all of AtEOXact_PgStat().  Per-relation and subxact stat
    handling still run, so nothing accumulated during the cleanup is lost.
    Renamed to AbortCurrentTransactionWithoutXactStats() to match.
    
    Nik