Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uSLSN-006PW6-PC for pgsql-general@arkaria.postgresql.org; Thu, 19 Jun 2025 20:01:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uSLSL-00EQwE-Np for pgsql-general@arkaria.postgresql.org; Thu, 19 Jun 2025 20:01:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uSLSL-00EQvz-82 for pgsql-general@lists.postgresql.org; Thu, 19 Jun 2025 20:01:54 +0000 Received: from mail.postgrespro.ru ([93.174.132.70]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uSLSI-0030E7-38 for pgsql-general@lists.postgresql.org; Thu, 19 Jun 2025 20:01:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1750363309; bh=rNXEAYOelX+EtB0d0Bv2Xzxt4PCQTBdNU4sFak6oopw=; h=Message-ID:Date:User-Agent:Subject:To:References:From:In-Reply-To: From; b=Ssl//hK/nkOlIPdnBKhv0jqLFjyYDsmzP6jxLlrOzOzfqaOCbbouKSqr97mKhn6Jb CvPuj7Eg1vxQUYrzGte5IcaIi48/SD7maaN2vaRnZ3Gt0Kr67a936icKWhruPms/Lp cMQoYZpiU5EoB7zxWYv1vmXLr9hyWMf+BUpiEYeXK/JwzMWLLnHcQTYh0HnPLWbBlu MLCdW5zsbXGLG/pbE9jnKSHqObihmmlBBRmERvOTUK+qy28y2rCQTYsa2XS066unPn cT2HA0JLld6TJ7UC05oDZGdjB86MQj6J3pPdSHVSsRZDNP/2aEEtxcMWTgUjp9zeCE v5QA3CVrq50MA== Received: from [192.168.0.101] (unknown [62.217.184.234]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: p.luzanov@postgrespro.ru) by mail.postgrespro.ru (Postfix/587) with ESMTPSA id 663FC60A5A; Thu, 19 Jun 2025 23:01:49 +0300 (MSK) Content-Type: multipart/alternative; boundary="------------ajlL2jlUNEOWwMuaV0MWZRMf" Message-ID: <1f740e0d-f58b-4492-85c4-bbfb330c9f89@postgrespro.ru> Date: Thu, 19 Jun 2025 23:01:48 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: does multi host connection string supports login event trigger exception To: legrand legrand , "pgsql-general@lists.postgresql.org" References: Content-Language: en-US, ru-RU From: Pavel Luzanov In-Reply-To: X-KSMG-AntiPhishing: NotDetected, bases: 2025/06/19 19:16:00 X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.1.0.7854, bases: 2025/06/19 17:13:00 #27577354 X-KSMG-AntiVirus-Status: NotDetected, skipped X-KSMG-LinksScanning: not scanned, disabled by settings X-KSMG-Message-Action: skipped X-KSMG-Rule-ID: 1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------ajlL2jlUNEOWwMuaV0MWZRMf Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 : 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 --------------ajlL2jlUNEOWwMuaV0MWZRMf Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit 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:
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
--------------ajlL2jlUNEOWwMuaV0MWZRMf--