Re: verify predefined LWLocks have entries in wait_event_names.txt
В списке pgsql-hackers по дате отправления:
| От | Nathan Bossart |
|---|---|
| Тема | Re: verify predefined LWLocks have entries in wait_event_names.txt |
| Дата | |
| Msg-id | 20240105174620.GA2285561@nathanxps13 обсуждение исходный текст |
| Ответ на | Re: 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
|
| Список | pgsql-hackers |
On Fri, Jan 05, 2024 at 10:42:03AM -0600, Nathan Bossart wrote: > On Fri, Jan 05, 2024 at 07:39:39AM +0000, Bertrand Drouvot wrote: >> + die "lists of predefined LWLocks in lwlocknames.txt and wait_event_names.txt do not match" >> + unless $wait_event_lwlocks[$i] eq $lockname; >> >> What about printing $wait_event_lwlocks[$i] and $lockname in the error message? >> Something like? >> >> " >> die "lists of predefined LWLocks in lwlocknames.txt and wait_event_names.txt do not match (comparing $lockname and$wait_event_lwlocks[$i])" >> unless $wait_event_lwlocks[$i] eq $lockname; >> " >> >> I think that would give more clues for debugging purpose. > > Sure, I'll add something like that. I think this particular scenario is > less likely, but that's not a reason to make the error message hard to > decipher. Here is a new version of the patch with this change. I also tried to make the verification logic less fragile. Instead of depending on the exact location of empty lines in wait_event_names.txt, v3 adds a marker comment below the list that clearly indicates it should not be changed. This simplifies the verification code a bit, too. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера