Keepalive

From: Rui DeSousa <rui(dot)desousa(at)icloud(dot)com>
To: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Keepalive
Date: 2024-06-14 15:22:06
Message-ID: 161042FE-FC86-456B-A8E1-AED38AE01820@icloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi All,

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.

Does anyone know if there is a difference on how Linux handles interrupted vs FreeBSD? I’ve actually used tcpdrop on FreeBSD to terminate stubborn sessions that were not responding to pg_terminate_backend().

Is this really expected behavior on Linux?

-Rui.

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2024-06-14 15:28:33 Re: Keepalive
Previous Message Laurenz Albe 2024-06-14 07:25:12 Re: Get PG primary version without substring manipulation?