Re: Autogenerate some wait events code and documentation

From: Andres Freund <andres(at)anarazel(dot)de>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Autogenerate some wait events code and documentation
Date: 2023-07-05 21:59:39
Message-ID: 20230705215939.ulnfbr4zavb2x7ri@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2023-07-05 10:57:19 +0900, Michael Paquier wrote:
> With all that in place, VPATH builds, the CI, meson, configure/make
> and the various cleanup targets were working fine, so I have applied
> it. Now let's see what the buildfarm tells.
>
> The final --stat number is like that:
> 22 files changed, 757 insertions(+), 2111 deletions(-)

That's pretty nice!

Rebasing a patch over this I was a bit confused because I got a bunch of
""unable to parse wait_event_names.txt" errors. Took me a while to figure out
that that was just because I didn't include a trailing . in the description.
Perhaps that could be turned into a more meaningful error?

die "unable to parse wait_event_names.txt"
unless $line =~ /^(\w+)\t+(\w+)\t+("\w+")\t+("\w.*\.")$/;

It's not helped by the fact that the regex in the error actually doesn't match
any lines, because it's not operating on the input but on
push(@lines, $section_name . "\t" . $_);

I also do wonder if we should invest in generating the lwlock names as
well. Except for a few abbreviations, the second column is always the
camel-cased version of what follows WAIT_EVENT_. Feels pretty tedious to write
that out.

Perhaps we should just change the case of the upper-cased names (DSM, SSL,
WAL, ...) to follow the other names?

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2023-07-05 22:00:41 Re: pgsql: Clean up role created in new subscription test.
Previous Message Jehan-Guillaume de Rorthais 2023-07-05 21:30:28 [BUG] Fix DETACH with FK pointing to a partitioned table fails