Re: Autogenerate some wait events code and documentation

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Andres Freund <andres(at)anarazel(dot)de>
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-07 04:49:24
Message-ID: ZKeZVPEBkBxYs1FY@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 06, 2023 at 06:19:43PM -0700, Andres Freund wrote:
> On 2023-07-06 09:36:12 +0900, Michael Paquier wrote:
>> So you mean renaming the existing events like WalSenderWaitForWAL to
>> WalSenderWaitForWal?
>
> Yes.
>
>> The impact on existing monitoring queries is not zero because any changes
>> would be silent, and that's the part that worried me the most even if it can
>> remove one column in the txt file.
>
> Then let's just use - or so to indicate the inferred name, with a "string"
> overriding it?

Hmm. If we go down this road I would make the choice of simplicity
and remove entirely a column, then, generating the snakecase from the
camelcase or vice-versa (say like a $string =~ s/([a-z]+)/$1_/g;),
even if it means having slightly incompatible strings showing to the
users. And I'd rather minimize the number of exceptions we need to
handle in this automation (aka no exception rules for some keywords
like "SSL" or "WAL", etc.).
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2023-07-07 04:53:32 Re: Disabling Heap-Only Tuples
Previous Message Isaac Morland 2023-07-07 03:22:13 Re: Fix search_path for all maintenance commands