From e02a2de29a62035c039c8e215c3f6752d459ff30 Mon Sep 17 00:00:00 2001 From: Evgeny Kuzin Date: Thu, 5 Mar 2026 09:31:02 -0500 Subject: [PATCH] libpq: try all addresses before moving to next host on session attrs mismatch --- src/interfaces/libpq/fe-connect.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index e7770da3a58..f2fad3a3e08 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -4432,10 +4432,10 @@ keep_going: /* We will come back to here until there is sendTerminateConn(conn); /* - * Try next host if any, but we don't want to consider - * additional addresses for this host. + * Try next address for this host first, then move to + * the next host if no more addresses. */ - conn->try_next_host = true; + conn->try_next_addr = true; goto keep_going; } } @@ -4487,10 +4487,10 @@ keep_going: /* We will come back to here until there is sendTerminateConn(conn); /* - * Try next host if any, but we don't want to consider - * additional addresses for this host. + * Try next address for this host first, then move to + * the next host if no more addresses. */ - conn->try_next_host = true; + conn->try_next_addr = true; goto keep_going; } } -- 2.47.2