Re: Dumb mistakes in WalSndWriteData() - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Dumb mistakes in WalSndWriteData()
Date
Msg-id CA+TgmoZsDF4bOcR=MbRFvpXuqNO1b1BGCDBk8_HedPn3CFqk+g@mail.gmail.com
Whole thread Raw
In response to Dumb mistakes in WalSndWriteData()  (Andres Freund <andres@anarazel.de>)
Responses Re: Dumb mistakes in WalSndWriteData()
List pgsql-hackers
On Mon, Oct 31, 2016 at 4:59 AM, Andres Freund <andres@anarazel.de> wrote:
> I^Wsomebody appears to have made a number of dumb mistakes in
> WalSndWriteData(), namely:
> 1) The timestamp is set way too late, after
>    pq_putmessage_noblock(). That'll sometimes work, sometimes not.  I
>    have no idea how that ended up happening. It's eye-wateringly dumb.
>
> 2) We only do WalSndKeepaliveIfNecessary() if we're blocked on socket
>    IO. But on a long-lived connection that might be a lot of data, we
>    should really do that once *before* trying to send the payload in the
>    first place.
>
> 3) Similarly to 2) it might be worthwhile checking for interrupts
>    everytime, not just when blocked on network IO.
>
> See also:
> http://archives.postgresql.org/message-id/CAMsr%2BYE2dSfHVr7iEv1GSPZihitWX-PMkD9QALEGcTYa%2Bsdsgg%40mail.gmail.com

Do you intend to do something about these problems?

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: DML and column cound in aggregated subqueries
Next
From: Amit Kapila
Date:
Subject: Re: Speed up Clog Access by increasing CLOG buffers