Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hHP9R-0006AP-SH for pgsql-general@arkaria.postgresql.org; Fri, 19 Apr 2019 08:45:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hHP9P-0000CS-Uo for pgsql-general@arkaria.postgresql.org; Fri, 19 Apr 2019 08:45:39 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hHP9P-0008UI-Ga for pgsql-general@lists.postgresql.org; Fri, 19 Apr 2019 08:45:39 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hHP9G-0006PI-40 for pgsql-general@lists.postgresql.org; Fri, 19 Apr 2019 08:45:38 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id 4C8AE27FD; Fri, 19 Apr 2019 10:45:27 +0200 (CEST) Date: Fri, 19 Apr 2019 10:45:27 +0200 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: PostgreSQL ping/pong to client Message-ID: <20190419084527.hvrkiparhh5bzxqs@hjp.at> References: <70c44319-1ff8-8d26-ceba-db2b20d8496d@aklaver.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="deksqxqugz4j45xt" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --deksqxqugz4j45xt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2019-04-17 18:41:57 +0200, Francisco Olarte wrote: > On Wed, Apr 17, 2019 at 4:49 PM Ajay Pratap = wrote: > > Correction: I meant when my java application dies postgres should break= all the connections that were associated with that peer. >=20 > 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. >=20 > 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 --=20 _ | 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 --deksqxqugz4j45xt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAly5iqIACgkQ8g5IURL+ KF0G+g/+KVB+g/GHE6rDTC0Jz7x0zVtsBvVFBhuge3/BGGv+Vzp/33OxRHjkIXVx iDh7AUvGbHPU1cGhoiHuFgvzgxHLwDynywhqjdrzh2rluQYdaJhvnKOi+4efvZxP GWkBypaU6cfg+Plz4BMWxkyNxjt2fb/MA6nisvapp9j8lIgd7vCG7TfRoylKP6ea /V77RSB7ARfro0qf88GyG6PJNTTpU8nDR855piL5IE3I5Oi0EXB4ElKPGpaGXa5f ASk4N61c+oH+gwf9kWLdS06AS9K2Uv96w6gVjOIaW3yK9DqEd+Uco9ut4XTEgbvF gS7LRJtphoH3WRGvQlrDrAdQxFhKny9OyNpeQx7n/ThHlWW3ms+31pYYwWtf2YUs 7Kbc8KX84wuYCMuDiAEC+QdvCWHmpNEqon84wyfwVIB8YqA/mPrbD6ViXm15btfV WBA48pDE2TTvweXp3foM69wQTlMjFWMBgWKePSOeCWNWEmomUH8zbQtK7UNyR4Xw fU+aBxYlZjWfnS0BG/PGO8zH+JHEdzq4e9NTbysAlotIMLfIerPrevIYKuoHVt9x ZqIlpyQh5iF+9uHKRjUskui0Qqe4Y1s/9Hc45OyqNDiuKbtvBVHWZRghkUaYpT3O i0ZKOOb4vK9VvwEz6vImc5Sa5HaME+46NuwfBCRPv7CAk1cEd8s= =njsk -----END PGP SIGNATURE----- --deksqxqugz4j45xt--