From: Tom Lane <tgl@sss.pgh.pa.us>
To: Rui DeSousa <rui.desousa@icloud.com>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: Keepalive
Date: Fri, 14 Jun 2024 11:28:33 -0400
Message-ID: <2300378.1718378913@sss.pgh.pa.us> (raw)
In-Reply-To: <161042FE-FC86-456B-A8E1-AED38AE01820@icloud.com>
References: <161042FE-FC86-456B-A8E1-AED38AE01820@icloud.com>
Rui DeSousa <rui.desousa@icloud.com> writes:
> I have a very long running query that is not being terminated after a keep alive timeout event. The situation is that the client drops from the network, the servers’ tcp/ip stack drops the connection, and the Postgres query continues to run without a network connection.
> The given system is running on Linux and I’m being told this is expected behavior; however, that is not has not been my experience. My preferred platform to run Postgres on is FreeBSD and in cases like this the Postgres session is also terminated once the tcp/ip connection is dropped by the kernel.
Really?
I would expect the query to keep running until the backend tries to
perform some I/O to the client. How quickly that happens would depend
a great deal on the details of the query, but not on which OS you're
running on.
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, rui.desousa@icloud.com
Subject: Re: Keepalive
In-Reply-To: <2300378.1718378913@sss.pgh.pa.us>
* 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