Re: PostgreSQL ping/pong to client

From: "Peter J(dot) Holzer" <hjp-pgsql(at)hjp(dot)at>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: PostgreSQL ping/pong to client
Date: 2019-04-19 08:45:27
Message-ID: 20190419084527.hvrkiparhh5bzxqs@hjp.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)drishti-soft(dot)com> wrote:
> > Correction: I meant when my java application dies postgres should break all the connections that were associated with that 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(at)hjp(dot)at | management tools.
__/ | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2019-04-19 17:55:29 Primary key data type: integer vs identity
Previous Message Jamesie Pic 2019-04-19 08:26:35 Re: Where to store Blobs?