Re: Proposal: Add a callback data parameter to GetNamedDSMSegment
В списке pgsql-hackers по дате отправления:
| От | Nathan Bossart |
|---|---|
| Тема | Re: Proposal: Add a callback data parameter to GetNamedDSMSegment |
| Дата | |
| Msg-id | aTw9Q-p8zzog1PgO@nathan обсуждение исходный текст |
| Ответ на | Re: Proposal: Add a callback data parameter to GetNamedDSMSegment (Sami Imseih <samimseih@gmail.com>) |
| Список | pgsql-hackers |
On Thu, Dec 11, 2025 at 05:17:30PM -0600, Sami Imseih wrote: >> If the initialization callback function needed the name, it could be >> provided via the "void *" callback argument, right? I'm not following why >> we need to provide it separately. > > While it's true it can be passed as extra data, it is less error-prone > as we guarantee the real name of the segment is made available to > the callback. Also a caller to GetNamedDSMSegment does not need to > pass the name twice, as the name and as extra data. The most common > case I would think is using the segment name as the tranche name when > initializing a lwlock. But... they can just pass that in the "void *" argument. I'm pretty firmly -1 for adding more than the one callback argument here. -- nathan
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера