Re: libpq async connection and multiple hosts - Mailing list pgsql-hackers

From Daniele Varrazzo
Subject Re: libpq async connection and multiple hosts
Date
Msg-id CA+mi_8ZBdOfY+MXL=qn7VKtsw7ojftBT32R6=idahr8-VJfvsA@mail.gmail.com
Whole thread Raw
In response to Re: libpq async connection and multiple hosts  (Jelte Fennema <postgres@jeltef.nl>)
List pgsql-hackers
On Wed, 25 Oct 2023 at 17:35, Jelte Fennema <postgres@jeltef.nl> wrote:

> Another approach is to use tcp_user_timeout instead of connect_timeout
> to skip non-responsive hosts. It's not completely equivalent though to
> connection_timeout though, since it also applies when the connection
> is actually being used. Also it only works on Linux afaik. It could be
> nice to add support for BSD its TCP_CONNECTIONTIMEOUT socket option.

This seems brittle and platform-dependent enough that we would surely
receive less grief by hardcoding a default two minutes timeout.

-- Daniele



pgsql-hackers by date:

Previous
From: Daniele Varrazzo
Date:
Subject: Re: libpq async connection and multiple hosts
Next
From: Nikita Malakhov
Date:
Subject: Re: remaining sql/json patches