Re: [HACKERS] PATCH: Batch/pipelining support for libpq - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: [HACKERS] PATCH: Batch/pipelining support for libpq
Date
Msg-id CAMsr+YHK59uhwyEs1cy_BGw9Ntak1OFacjDcKiSMnsLd0ekUeA@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] PATCH: Batch/pipelining support for libpq  (Andres Freund <andres@anarazel.de>)
Responses Re: [HACKERS] PATCH: Batch/pipelining support for libpq
Re: [HACKERS] PATCH: Batch/pipelining support for libpq
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [HACKERS] Pluggable storage
Next
From: Andres Freund
Date:
Subject: Re: [HACKERS] PATCH: Batch/pipelining support for libpq