| From: | Nikolay Samokhvalov <nik(at)postgres(dot)ai> |
|---|---|
| To: | vignesh C <vignesh21(at)gmail(dot)com> |
| Cc: | pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Rafael Thofehrn Castro <rafaelthca(at)gmail(dot)com> |
| Subject: | Re: xact_rollback spikes when logical walsender exits |
| Date: | 2026-05-13 00:06:40 |
| Message-ID: | CAM527d87FpMWfDbCfJF9EF9uOXMcX87+bafxjHA_dGydH_RB9A@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Mon, Apr 20, 2026 at 11:38 PM vignesh C <vignesh21(at)gmail(dot)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
| Attachment | Content-Type | Size |
|---|---|---|
| v2-logical-rollback-spike.patch | application/octet-stream | 12.3 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jonathan S. Katz | 2026-05-13 00:25:32 | PostgreSQL 19 Beta 1 release date |
| Previous Message | Paul A Jungwirth | 2026-05-13 00:05:03 | Re: FOR PORTION OF does not recompute GENERATED STORED columns that depend on the range column |