Re: An unkillable connection caused replication delay on my replica - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: An unkillable connection caused replication delay on my replica
Date
Msg-id 20160629183926.GA125026@alvherre.pgsql
Whole thread Raw
In response to Re: An unkillable connection caused replication delay on my replica  (Shawn <shamccoy@amazon.com>)
List pgsql-hackers
Shawn wrote:
> Unfortunately...no.  I have been trying to repro this scenario.  Is there a
> specific way to make a Python connection where this is possible?
> 
> My end game, if this is not something that can be fixed on the Postgres
> side, is to come up with a way to automatically cause the connection to drop
> (iptables, something else...etc).

Well.  I was toying with a server a few days ago that had two processes
with queries "running" for eight days, but the client had long since
disconnected -- but the TCP keepalives didn't fire, because the kernel
was stuck trying to get free memory for something but the outgoing
network buffer was full so nothing was happening.  That looked like a
kernel bug to me, and I don't think iptables would help you there.
Signalling the Postgres process in the normal way didn't do anything, as
they were stuck in the kernel.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Improving executor performance
Next
From: Tom Lane
Date:
Subject: Re: Re: Should phraseto_tsquery('simple', 'blue blue') @@ to_tsvector('simple', 'blue') be true ?