Re: libpq async connection and multiple hosts

From: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
To: Jelte Fennema <postgres(at)jeltef(dot)nl>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: libpq async connection and multiple hosts
Date: 2023-10-25 16:58:10
Message-ID: CA+mi_8ZBdOfY+MXL=qn7VKtsw7ojftBT32R6=idahr8-VJfvsA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 25 Oct 2023 at 17:35, Jelte Fennema <postgres(at)jeltef(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nikita Malakhov 2023-10-25 17:13:07 Re: remaining sql/json patches
Previous Message Daniele Varrazzo 2023-10-25 16:54:15 Re: libpq async connection and multiple hosts