pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter J. Holzer <hjp-pgsql@hjp.at>
To: pgsql-general@lists.postgresql.org
Subject: Re: PostgreSQL ping/pong to client
Date: Fri, 19 Apr 2019 10:45:27 +0200
Message-ID: <20190419084527.hvrkiparhh5bzxqs@hjp.at> (raw)
In-Reply-To: <CA+bJJbyRp9Y8iQ3zDyJgBZDP4OsP4zA3uJ7=qCBEhC5dYoAWuw@mail.gmail.com>
References: <CABi=8qzPO-TOMsfRoWKVUtaAa=HzkPSCzYxo61CRsVfgT0hX4g@mail.gmail.com>
	<70c44319-1ff8-8d26-ceba-db2b20d8496d@aklaver.com>
	<CABi=8qwKpaXAUjQjbS=bSJq-LqEWRYCZD6C6dd3hzVyHQa2s5A@mail.gmail.com>
	<CA+bJJbyRp9Y8iQ3zDyJgBZDP4OsP4zA3uJ7=qCBEhC5dYoAWuw@mail.gmail.com>

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 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@hjp.at         | management tools.
__/   | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/;

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (9+ messages)

Message-ID: <20190419084527.hvrkiparhh5bzxqs@hjp.at>
Permalink:  ../20190419084527.hvrkiparhh5bzxqs@hjp.at/
Also on:    postgresql.org/message-id/20190419084527.hvrkiparhh5bzxqs@hjp.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: hjp-pgsql@hjp.at
  Subject: Re: PostgreSQL ping/pong to client
  In-Reply-To: <20190419084527.hvrkiparhh5bzxqs@hjp.at>
  References: <CABi=8qzPO-TOMsfRoWKVUtaAa=HzkPSCzYxo61CRsVfgT0hX4g@mail.gmail.com> <70c44319-1ff8-8d26-ceba-db2b20d8496d@aklaver.com> <CABi=8qwKpaXAUjQjbS=bSJq-LqEWRYCZD6C6dd3hzVyHQa2s5A@mail.gmail.com> <CA+bJJbyRp9Y8iQ3zDyJgBZDP4OsP4zA3uJ7=qCBEhC5dYoAWuw@mail.gmail.com> <20190419084527.hvrkiparhh5bzxqs@hjp.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox