Re: PostgreSQL ping/pong to client - Mailing list pgsql-general

From Peter J. Holzer
Subject Re: PostgreSQL ping/pong to client
Date
Msg-id 20190419084527.hvrkiparhh5bzxqs@hjp.at
Whole thread Raw
In response to Re: PostgreSQL ping/pong to client  (Francisco Olarte <folarte@peoplecall.com>)
List pgsql-general
On 2019-04-17 18:41:57 +0200, Francisco Olarte wrote:
> On Wed, Apr 17, 2019 at 4:49 PM Ajay Pratap <ajaypratap@drishti-soft.com> wrote:
> > Correction: I meant when my java application dies postgres should break all the connections that were associated
withthat peer. 
>
> And how is the server supposed to detect that without keepalives?

Ajay was taliking about an application crashing. If that happens, the OS
(on the application machine) should close all connections the
application had open. So in that case PostgreSQL just gets EOF on any
attempt to read from or write to the socket.

I'm sure this works for any unixoid OS and fairly sure it works for
Windows, too.

If for some reason this doesn't work for Ajay, I suspect that the
problem isn't what he thinks it is and should investigate the cause
further.

> TCP is dessigned to survice for extended period of times without
> traffic, I used that a lot in the dial up times.
>
> And what makes you think keepalives are impactful and unrealistic? I
> use them a lot, they do not impact my workloads measurably.

Right. But keepalives solve a different problem (detecting loss of
network connectivity or the peer machine being turned off).

        hp

--
   _  | Peter J. Holzer    | we build much bigger, better disasters now
|_|_) |                    | because we have much more sophisticated
| |   | hjp@hjp.at         | management tools.
__/   | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/>

Attachment

pgsql-general by date:

Previous
From: Jamesie Pic
Date:
Subject: Re: Where to store Blobs?
Next
From: Rich Shepard
Date:
Subject: Primary key data type: integer vs identity