Re: s/shm_mq_iovec/struct iovec/

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: s/shm_mq_iovec/struct iovec/
Дата
Msg-id 6bc59788-f1b0-478a-891b-89c5757ec311@iki.fi
обсуждение исходный текст
Ответ на [MASSMAIL]s/shm_mq_iovec/struct iovec/  (Thomas Munro <thomas.munro@gmail.com>)
Ответы Re: s/shm_mq_iovec/struct iovec/
Список pgsql-hackers
On 15/04/2024 04:20, Thomas Munro wrote:
> Hi,
> 
> I was grepping for iovec users and noticed that the shm_mq stuff
> defines its own iovec struct.  Is there any reason not to use the
> standard one, now that we can?  Will add to next commitfest.

I think it's better to keep them separate. They serve a similar purpose, 
but they belong to completely separate APIs; I think "incidental 
deduplication" is the right term for that. shm_mq_iovec is only used by 
our shm queue implementation, while struct iovec is part of the POSIX 
API. We wouldn't want to leak IOV_MAX into how shm_mq_iovec is used, for 
example. Or as a thought experiment, if our shm_mq implementation needed 
an extra flag in the struct or something, we would be free to just add 
it. But if it we reused struct iovec, then we couldn't, or we'd need to 
create a new struct again.

-- 
Heikki Linnakangas
Neon (https://neon.tech)




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

Предыдущее
От: wenhui qiu
Дата:
Сообщение: Re: Support "Right Semi Join" plan shapes
Следующее
От: Aleksander Alekseev
Дата:
Сообщение: Re: Grammar guidelines in Postgres