Re: Proposal: PqSendBuffer removal
От | Aleksei Ivanov |
---|---|
Тема | Re: Proposal: PqSendBuffer removal |
Дата | |
Msg-id | CAN0E21Nt7SFqrbO55Jd_PGQ2AakQF_h8EbUmVP-5SfzrMrG9TA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Proposal: PqSendBuffer removal (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Proposal: PqSendBuffer removal
Re: Proposal: PqSendBuffer removal |
Список | pgsql-hackers |
Thank you for your reply!
Yes, you are right there will be a separate call to send the data, but is copying data each time more costly operation than just one syscall?
Besides, if we already have a ready message packet to be sent why should we wait?
Waiting for your reply,
Best regards!
On Thu, Mar 5, 2020 at 13:10 Tom Lane <tgl@sss.pgh.pa.us> wrote:
Aleksei Ivanov <iv.alekseii@gmail.com> writes:
> I am really curious what was the original intention of using the
> PqSendBuffer and is it possible to remove it now.
> Currently all messages are copied from StringInfo to this buffer and sent,
> which from my point of view is redundant operation.
That would mean doing a separate send() kernel call for every few bytes,
no? I think the point of that buffer is to be sure we accumulate a
reasonable number of bytes to pass to the kernel for each send().
regards, tom lane
В списке pgsql-hackers по дате отправления: