Add ETIMEDOUT to ALL_CONNECTION_FAILURE_ERRNOS

Jelte Fennema-Nio <jelte.fennema@microsoft.com>

From: Jelte Fennema <Jelte.Fennema@microsoft.com>
To: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2021-09-30T10:00:43Z
Lists: pgsql-hackers

Attachments

Previously successfully opened TCP connections can still fail on reads
with ETIMEDOUT. This should be considered a connection failure, so that
the connection in libpq is marked as CONNECTION_BAD. The reason I got an
ETIMEDOUT was, because I had set a low tcp_user_timeout in the
connection string. However, it can probably also happen due to
keepalive limits being reached.

Commits

  1. Treat ETIMEDOUT as indicating a non-recoverable connection failure.