Re: verify predefined LWLocks have entries in wait_event_names.txt

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: verify predefined LWLocks have entries in wait_event_names.txt
Дата
Msg-id CA+TgmoYRhhL12iOcNKv6f__iZMk1_BPgbASFykPazhr_bwk0=w@mail.gmail.com
обсуждение исходный текст
Ответ на verify predefined LWLocks have entries in wait_event_names.txt  (Nathan Bossart <nathandbossart@gmail.com>)
Ответы Re: verify predefined LWLocks have entries in wait_event_names.txt  (Nathan Bossart <nathandbossart@gmail.com>)
Список pgsql-hackers
On Tue, Jan 2, 2024 at 12:31 PM Nathan Bossart <nathandbossart@gmail.com> wrote:
> I think we're supposed to omit the "Lock" suffix in wait_event_names.txt.

Ugh, sorry. But also, why in the world?

> > It seems like it would be good if there were an automated cross-check
> > between lwlocknames.txt and wait_event_names.txt.
>
> +1.  Here's a hastily-thrown-together patch for that.  I basically copied
> 003_check_guc.pl and adjusted it for this purpose.  This test only checks
> that everything in lwlocknames.txt has a matching entry in
> wait_event_names.txt.  It doesn't check that everything in the predefined
> LWLock section of wait_event_names.txt has an entry in lwlocknames.txt.
> AFAICT that would be a little more difficult because you can't distinguish
> between the two in pg_wait_events.
>
> Even with this test, I worry that we could easily forget to add entries in
> wait_event_names.txt for the non-predefined locks, but I don't presently
> have a proposal for how to prevent that.

It certainly seems better to check what we can than to check nothing.

Suggestions:

- Check in both directions instead of just one?

- Verify ordering?

--
Robert Haas
EDB: http://www.enterprisedb.com



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

Предыдущее
От: "Andrey M. Borodin"
Дата:
Сообщение: Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Things I don't like about \du's "Attributes" column