Re: tcp keepalives not sent during long query - Mailing list pgsql-general

From Laurenz Albe
Subject Re: tcp keepalives not sent during long query
Date
Msg-id c5ab4fc032e99d6aa8a982adc77c245fbd5a9ccc.camel@cybertec.at
Whole thread Raw
In response to tcp keepalives not sent during long query  (Willy-Bas Loos <willybas@gmail.com>)
Responses Re: tcp keepalives not sent during long query  (Willy-Bas Loos <willybas@gmail.com>)
List pgsql-general
On Wed, 2022-12-14 at 08:55 +0100, Willy-Bas Loos wrote:
> Some users of our database have a NAT firewall and keep a postgres client (e.g. pgAdmin )
> open for hours. To prevent the connection from being killed by the firewall due to inactivity,
> we configured tcp_keepalives_idle = 120 so that the server sends keepalives and keeps the
> connection active. (this is on debian)
> 
> We've recently upgraded from postgres 9.3 to 13 and from debian 6 to 11.
> I'm getting the complaint that since the upgrade, the connection breaks. But only when they run a long query.
> 
> Has anything changed in postgres that might cause this? e.g. that keepalives are only sent when the session is idle?

It is the operating system kernel that sends keepalives, so that should be independent of
what the PostgreSQL backend is doing.

Yours,
Laurenz Albe



pgsql-general by date:

Previous
From: Willy-Bas Loos
Date:
Subject: tcp keepalives not sent during long query
Next
From: Willy-Bas Loos
Date:
Subject: Re: tcp keepalives not sent during long query