Re: Multiple hosts in connection string failed to failover in non-hot standby mode
Noah Misch <noah@leadboat.com>
From: Noah Misch <noah@leadboat.com>
To: Hubert Zhang <zhubert@vmware.com>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2020-10-28T10:37:34Z
Lists: pgsql-hackers
On Tue, Oct 27, 2020 at 07:14:14AM +0000, Hubert Zhang wrote: > Libpq has supported to specify multiple hosts in connection string and enable auto failover when the previous PostgreSQL instance cannot be accessed. > But when I tried to enable this feature for a non-hot standby, it cannot do the failover with the following messages. > > psql: error: could not connect to server: FATAL: the database system is starting up > > Document says ' If a connection is established successfully, but authentication fails, the remaining hosts in the list are not tried.' > I'm wondering is it a feature by design or a bug? If it's a bug, I plan to fix it. I felt it was a bug, but the community as a whole may or may not agree: https://postgr.es/m/flat/16508-1a63222835164566%40postgresql.org
Commits
-
Clear conn->errorMessage at successful completion of PQconnectdb().
- 896a0c44f93b 14.0 landed
- 138531f1bbc3 15.0 landed
-
Avoid ECPG test failures in some GSS-capable environments.
- 9bb5eecce645 14.0 landed
-
Try next host after a "cannot connect now" failure.
- c1d589571c49 14.0 landed
-
Uniformly identify the target host in libpq connection failure reports.
- 52a10224e3cc 14.0 landed
-
Allow pg_regress.c wrappers to postprocess test result files.
- 800d93f314b0 14.0 landed
-
In libpq, always append new error messages to conn->errorMessage.
- ffa2e4670123 14.0 landed