Re: walsender doesn't send keepalives when writes are pending - Mailing list pgsql-hackers

From Greg Stark
Subject Re: walsender doesn't send keepalives when writes are pending
Date
Msg-id CAM-w4HNmk9hk+Okc331Yy9fwnwMkrbg=BftpPfXE5LzUpNed+g@mail.gmail.com
Whole thread Raw
In response to walsender doesn't send keepalives when writes are pending  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: walsender doesn't send keepalives when writes are pending  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
On Fri, Feb 14, 2014 at 12:05 PM, Andres Freund <andres@2ndquadrant.com> wrote:
> There's no reason not
> to ask for a ping when we're writing.


Is there a reason to ask for a ping? The point of keepalives is to
ensure there's some traffic on idle connections so that if the
connection is dead it doesn't linger forever and so that any on-demand
links (or more recently NAT routers or stateful firewalls) don't time
out and disconnect and have to reconnect (or more recently just fail
outright).

By analogy TCP doesn't send any keepalives if there is any traffic on
the link. On the other hand I happen to know (the hard way) that
typical PPPoE routers *do* send LCP pings even when the link is busy
so there's precedent for either behaviour. I'm guess it comes down to
why you want the keepalives.


-- 
greg



pgsql-hackers by date:

Previous
From: Florian Pflug
Date:
Subject: Re: Memory ordering issue in LWLockRelease, WakeupWaiters, WALInsertSlotRelease
Next
From: Alvaro Herrera
Date:
Subject: Re: HBA files w/include support?