From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Xuneng Zhou <xunengzhou(at)gmail(dot)com> |
Cc: | Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, Kevin K Biju <kevinkbiju(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Add new wait event to XactLockTableWait |
Date: | 2025-06-08 22:41:04 |
Message-ID: | aEYRgDVS4lflxUyr@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, Jun 08, 2025 at 10:30:45PM +0800, Xuneng Zhou wrote:
> This is more problematic in logical replication scenarios where these
> waits can be very long - for example, when creating a logical
> replication slot on a busy system. Without a specific wait event, it's
> hard to distinguish legitimate wait from other issues.
Gotcha.
> Based on suggestions from Fujii and Kevin [1], the patch introduces
> WAIT_EVENT_XACT_DONE ("Waiting for a transaction to commit or abort")
> and instructs both functions to report this event during their
> pg_usleep() calls With patch applied, when backends are waiting in
> these functions, pg_stat_activity will show what they're waiting for.
+ pgstat_report_wait_start(WAIT_EVENT_XACT_DONE);
[...]
+ pgstat_report_wait_start(WAIT_EVENT_XACT_DONE);
Wouldn't it be better to use two wait events named differently to be
able to make the difference between the two code paths?
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2025-06-08 23:05:29 | Re: Non-reproducible AIO failure |
Previous Message | Tomas Vondra | 2025-06-08 22:16:04 | Re: amcheck support for BRIN indexes |