Re: Autogenerate some wait events code and documentation

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Autogenerate some wait events code and documentation
Дата
Msg-id 20230716192120.t53prl2uruingo6z@awork3.anarazel.de
обсуждение исходный текст
Ответ на Re: Autogenerate some wait events code and documentation  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: Autogenerate some wait events code and documentation  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
Hi,

On 2023-07-14 13:49:22 +0900, Michael Paquier wrote:
> I have looked again at 0001 and 0002 and applied them to get them out
> of the way.  0003 and 0004 are rebased and attached.  I'll add them to
> the CF for later consideration.  More opinions are welcome.

> From b6390183bdcc054df82279bb0b2991730f85a0a3 Mon Sep 17 00:00:00 2001
> From: Michael Paquier <michael@paquier.xyz>
> Date: Thu, 13 Jul 2023 10:14:47 +0900
> Subject: [PATCH v3 4/4] Remove column for enum elements in
>  wait_event_names.txt
> 
> This file is now made of two columns, removing the column listing the
> enum elements for each wait event class:
> - Camelcase event name used in pg_stat_activity.  There are now
> unquoted.
> - Description of the documentation.

> The enum elements are generated from what is now the first column.

I think the search issue is valid, so I do think going the other way is
preferrable. I.e. use just the enum value in the .txt and generate the camel
case name from that. That allows you to search the define used in code and
find a hit in the file.

I personally would still leave off the WAIT_EVENT prefix in the .txt, I think
most of us can remember to chop that off.

I don't think we need to be particularly consistent with wait events across
major versions. They're necessarily tied to how the code works, and we've
yanked that around plenty.

Greetings,

Andres Freund



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alena Rybakina
Дата:
Сообщение: Re: Problems with estimating OR conditions, IS NULL on LEFT JOINs
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: Use of additional index columns in rows filtering