Re: Autogenerate some wait events code and documentation - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Autogenerate some wait events code and documentation
Date
Msg-id 20230705215939.ulnfbr4zavb2x7ri@awork3.anarazel.de
Whole thread Raw
In response to Re: Autogenerate some wait events code and documentation  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Autogenerate some wait events code and documentation
List 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



pgsql-hackers by date:

Previous
From: Jehan-Guillaume de Rorthais
Date:
Subject: [BUG] Fix DETACH with FK pointing to a partitioned table fails
Next
From: Daniel Gustafsson
Date:
Subject: Re: pgsql: Clean up role created in new subscription test.