From: | "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com> |
---|---|
To: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: "duplicated" wait events |
Date: | 2023-08-07 08:21:50 |
Message-ID: | e81ca8a9-1d11-110c-1e62-87348b6a2986@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 8/7/23 7:46 AM, Kyotaro Horiguchi wrote:
> At Fri, 4 Aug 2023 17:07:51 +0200, "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com> wrote in
>> SynRep currently appears in "IPC" and "LWLock" (see [2])
>> WALWrite currently appears in "IO" and "LWLock" (see [2])
>>
>> I think that can lead to confusion and it would be better to avoid
>> duplicate wait event
>> name across Wait Class (and so fix those 2 ones above), what do you
>> think?
>
> I think it would be handy to be able to summirize wait events by event
> names, instead of classes. In other words, grouping wait events
> through all classes according to their purpose. From that perspective,
> I'm rather fan of consolidating event names (that is, the opposite of
> your proposal).
>
I could agree if they had the same descriptions and behaviors.
For example with WALWrite:
WALWrite in "IO" is described as "Waiting for a write to a WAL file" and
is described in "LWLock" as "Waiting for WAL buffers to be written to disk".
Having two distinct descriptions seems to suggest the wait events are not the same.
Also I think it makes sense to distinguish both as the LWLock one could
be reported as waiting in LWLockReportWaitStart() while trying to grab the
lock in LW_SHARED mode (as done in GetLastSegSwitchData()).
I think there is 2 things to address:
1) fix the current duplicates
2) put safeguard in place
As far 1), it could be easily done by updating wait_event_names.txt (renaming duplicates)
in the master branch. As the duplication has been introduced in 14a9101091
(so starting as of PG 13) we would need to update monitoring.sgml for <= 16 should we want to
back patch.
2) could be handled in generate-wait_event_types.pl on master.
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
From | Date | Subject | |
---|---|---|---|
Next Message | Drouvot, Bertrand | 2023-08-07 08:23:27 | Re: WIP: new system catalog pg_wait_event |
Previous Message | Yuya Watari | 2023-08-07 08:19:06 | Re: [PoC] Reducing planning time when tables have many partitions |