Re: does multi host connection string supports login event trigger exception

From: Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru>
To: legrand legrand <legrand_legrand(at)hotmail(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: does multi host connection string supports login event trigger exception
Date: 2025-06-19 20:01:48
Message-ID: 1f740e0d-f58b-4492-85c4-bbfb330c9f89@postgrespro.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi, legrand!

On 19.06.2025 22:31, legrand legrand wrote:
> I'm trying to build a login event trigger in conjonction with a multi
> host connectio string
> to manager instances roles in a logical replication cluster.

According to docs
<https://www.postgresql.org/docs/current/libpq-connect.html#:~:text=If%20a%20connection%20is%20established%20successfully>:
If a connection is established successfully, but authentication fails,
the remaining hosts in the list are not tried.

So, I think that this is impossible to use multiple hosts feature of
libpq with on login trigger to skip some host.

--
Pavel Luzanov
Postgres Professional:https://postgrespro.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Phillip Diffley 2025-06-19 21:05:35 Convert JSON value back to postgres representation
Previous Message legrand legrand 2025-06-19 19:31:51 does multi host connection string supports login event trigger exception