| От | Tom Lane |
|---|---|
| Тема | Re: [HACKERS] Atomics for heap_parallelscan_nextpage() |
| Дата | |
| Msg-id | 24293.1502912589@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: [HACKERS] Atomics for heap_parallelscan_nextpage() (Heikki Linnakangas <hlinnaka@iki.fi>) |
| Список | pgsql-hackers |
Heikki Linnakangas <hlinnaka@iki.fi> writes:
> On 08/16/2017 09:00 PM, Tom Lane wrote:
>> I don't buy that argument. A caller might think "Why do I need
>> shm_toc_estimate, when I can compute the *exact* size I need?".
>> And it would have worked, up till this proposed patch.
> Well, no. The size of the shm_toc struct is subtracted from the size
> that you give to shm_toc_create. As well as the sizes of the TOC
> entries. And those sizes are private to shm_toc.c, so a caller has no
> way to know what size it should pass to shm_toc_create(), in order to
> have N bytes of space actually usable. You really need to use
> shm_toc_estimate() if you want any guarantees on what will fit.
Good point --- objection withdrawn.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера