Re: Proposal: PqSendBuffer removal

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Aleksei Ivanov <iv(dot)alekseii(at)gmail(dot)com>
Cc: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Proposal: PqSendBuffer removal
Date: 2020-03-05 21:10:55
Message-ID: 24464.1583442655@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Aleksei Ivanov <iv(dot)alekseii(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2020-03-05 21:17:03 Re: Allowing ALTER TYPE to change storage strategy
Previous Message Aleksei Ivanov 2020-03-05 21:02:02 Proposal: PqSendBuffer removal