Hi,

On 8/7/23 7:46 AM, Kyotaro Horiguchi wrote:
At Fri, 4 Aug 2023 17:07:51 +0200, "Drouvot, Bertrand" 
<bertranddrouvot...@gmail.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


Reply via email to