From: Noah Misch <noah@leadboat.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Drouvot, Bertrand <bertranddrouvot.pg@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Autogenerate some wait events code and documentation
Date: Sun, 17 Mar 2024 18:31:30 -0700
Message-ID: <20240318013130.e5@rfd.leadboat.com> (raw)
In-Reply-To: <Zfd2gKf00dfxwi4d@paquier.xyz>
References: <976f4eb1-cbc0-9616-ec26-ebb4a252315c@gmail.com>
<ZGSM8oOpXsXrXy/v@paquier.xyz>
<69588eaf-02d7-95a8-0da4-3e120de16a59@gmail.com>
<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>
On Mon, Mar 18, 2024 at 08:02:24AM +0900, Michael Paquier wrote:
> > 1. Don't back-patch wait events to v17+. Use the closest existing event.
> > 2. Let wait_event_names.txt back-patches control the enum order. For example,
> > a line could have an annotation that controls its position relative to the
> > auto-sorted lines. For another example, the generator could stop sorting.
> > 3. Accept the renumbering, because the consequence isn't that horrible.
> I see an option (4), similar to your (2) without the per-line
> annotation: add a new magic keyword like the existing "Section" that
> is used in the first lines of generate-wait_event_types.pl where we
> generate tab-separated lines with the section name as prefix of each
> line. So I can think of something like:
> Section: ClassName - WaitEventFoo
> FOO_1 "Waiting in foo1"
> FOO_2 "Waiting in foo2"
> Backpatch:
> BAR_1 "Waiting in bar1"
> BAR_2 "Waiting in bar2"
>
> Then force the ordering for the docs and keep the elements in the
> backpatch section at the end of the enums in the order in the txt.
> One thing that could make sense is to enforce that "Backpatch" is at
> the end of a section, meaning that we would need a second keyword like
> a "Section: EndBackpatch" or something like that. That's not strictly
> necessary IMO as the format of the txt is easy to follow.
Works for me, with or without the trailing keyword line.
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: noah@leadboat.com, michael@paquier.xyz, bertranddrouvot.pg@gmail.com, pgsql-hackers@lists.postgresql.org
Subject: Re: Autogenerate some wait events code and documentation
In-Reply-To: <20240318013130.e5@rfd.leadboat.com>
* 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