On 22 June 2017 at 08:29, Andres Freund <andres@anarazel.de> wrote:
> I.e. we're doing tiny write send() syscalls (they should be coalesced)
That's likely worth doing, but can probably wait for a separate patch.
The kernel will usually do some packet aggregation unless we use
TCP_NODELAY (which we don't and shouldn't), and the syscall overhead
is IMO not worth worrying about just yet.
> and then completely unnecessarily call recv() over and over again
> without polling. To me it looks very much like we're just doing either
> exactly once per command...
Yeah, that looks suspect.
-- Craig Ringer http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services