Re: Autogenerate some wait events code and documentation
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: "Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>
Cc: Andres Freund <andres@anarazel.de>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2023-07-13T01:26:54Z
Lists: pgsql-hackers
Attachments
- v2-0001-Remove-quotes-from-second-column-of-wait_event_na.patch (text/x-diff) patch v2-0001
- v2-0002-Add-information-about-line-contents-on-parsing-fa.patch (text/x-diff) patch v2-0002
- v2-0003-Rename-wait-events-with-more-consistent-camelcase.patch (text/x-diff) patch v2-0003
- v2-0004-Remove-column-for-enum-elements-in-wait_event_nam.patch (text/x-diff) patch v2-0004
On Mon, Jul 10, 2023 at 07:52:23AM +0200, Drouvot, Bertrand wrote: > On 7/10/23 7:20 AM, Michael Paquier wrote: >> Hmm. Something like that could be done, for instance: >> >> # src/backend/utils/activity/wait_event_types.h >> -# typedef enum definitions for wait events. >> +# typedef enum definitions for wait events, generated from the first >> +# field. > > Yeah, it looks a good place for it. I am not sure where we are on that based on the objection from Alvaro to not remove the first column in wait_event_names.txt about greppability. Anyway, I am not seeing any objections behind my suggestion to simplify the second column and remove the quotes from the event names, either. Besides, the suggestion of Andres to improve the error message on parsing and show the line information is something useful in itself. Hence, attached is a rebased patch set that separates the work into more patches: - 0001 removes the quotes from the second column, improving the readability of the .txt file. - 0002 fixes the report from Andres to improve the error message on parsing. - 0003 is the rename of the wait events, in preparation for... - 0004 that removes entirely the first column (enum element names) from wait_event_names.txt. I would like to apply 0001 and 0002 to improve the format if there are no objections. 0003 and 0004 are still here for discussion, as it does not seem like a consensus has been reached for that yet. Getting more opinions would be a good next step for the last two patches, I assume. So, any comments? -- Michael
Commits
-
Add "ABI_compatibility" regions to wait_event_names.txt
- f98dbdeb51d1 17.0 landed
-
Remove column for wait event names in wait_event_names.txt
- 59cbf60c0f2b 17.0 landed
-
Use more consistent names for wait event objects and types
- 414f6c0fb79a 17.0 landed
-
Add information about line contents on parsing failure of wait_event_names.txt
- aea7fe33fb6a 17.0 landed
-
Remove double quotes from the second column of wait_event_names.txt
- 183a60a628fe 17.0 landed
-
Generate automatically code and documentation related to wait events
- fa88928470b5 17.0 landed
-
Refactor some code related to wait events "BufferPin" and "Extension"
- 2aeaf80e578e 17.0 landed
-
doc: Fix ordering of entries in wait event table for I/O type
- 44e977d7ecb9 16.0 landed