From: Michael Paquier <michael@paquier.xyz>
To: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Cc: Noah Misch <noah@leadboat.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Autogenerate some wait events code and documentation
Date: Tue, 19 Mar 2024 09:59:35 +0900
Message-ID: <Zfjjd-sqqBNTXiIR@paquier.xyz> (raw)
In-Reply-To: <ZfiAbt8u+XW+Raps@ip-10-97-1-34.eu-west-3.compute.internal>
References: <ZGWrTn//v+WAqMpN@paquier.xyz>
<ZKJxZrnFTxoCx8a5@paquier.xyz>
<ZKJ0tzXSH1LyqI9V@paquier.xyz>
<0b3cdac7-f078-61a6-76e0-99db7aae78ce@gmail.com>
<ZKTN//NfDeP1egLW@paquier.xyz>
<20240317183114.16@rfd.leadboat.com>
<Zfd2gKf00dfxwi4d@paquier.xyz>
<ZfgDrC5lW99sI8MM@ip-10-97-1-34.eu-west-3.compute.internal>
<20240318154934.10.nmisch@google.com>
<ZfiAbt8u+XW+Raps@ip-10-97-1-34.eu-west-3.compute.internal>
On Mon, Mar 18, 2024 at 05:57:02PM +0000, Bertrand Drouvot wrote:
> Thanks for looking at it!
> Oh right, the comment is wrong, re-worded in v2 attached.
I've added a couple of fake events in my txt file, and this results in
an ordering of the wait events in the docs while the backpatched wait
events are added at the end of the enums, based on their order in the
txt file.
# When adding a new wait event, make sure it is placed in the appropriate
-# ClassName section.
+# ClassName section. If the wait event is backpatched from master to a version
+# >= 17 then put it under a "Backpatch:" delimiter at the end of the related
+# ClassName section (on the non master branches) or at its natural position on
+# the master branch.
+# Ensure that the backpatch regions are always empty on the master branch.
I'd recommend to not mention a version number at all, as this would
need a manual refresh each time a new stable branch is forked.
Your solution is simpler than what I finished in mind when looking at
the code yesterday, with the addition of a second array that's pushed
to be at the end of the "sorted" lines ordered by the second column.
That does the job.
(Note that I'll go silent for some time; I'll handle this thread when
I get back as this is not urgent.)
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: michael@paquier.xyz, bertranddrouvot.pg@gmail.com, noah@leadboat.com, pgsql-hackers@lists.postgresql.org
Subject: Re: Autogenerate some wait events code and documentation
In-Reply-To: <Zfjjd-sqqBNTXiIR@paquier.xyz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox