Re: Autogenerate some wait events code and documentation

Поиск
Список
Период
Сортировка
От Noah Misch
Тема Re: Autogenerate some wait events code and documentation
Дата
Msg-id 20240318013130.e5@rfd.leadboat.com
обсуждение исходный текст
Ответ на Re: Autogenerate some wait events code and documentation  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
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.



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Weird test mixup
Следующее
От: Michael Paquier
Дата:
Сообщение: PostgreSQL 17 Release Management Team & Feature Freeze