Re: Multiple hosts in connection string failed to failover in non-hot standby mode
Daniel Gustafsson <daniel@yesql.se>
From: Daniel Gustafsson <daniel@yesql.se>
To: Michael Paquier <michael@paquier.xyz>
Cc: Tom Lane <tgl@sss.pgh.pa.us>,
Justin Pryzby <pryzby@telsasoft.com>,
Hubert Zhang <zhubert@vmware.com>,
tsunakawa.takay@fujitsu.com,
pgsql-hackers@postgresql.org,
Andreas Seltenreich <seltenreich@gmx.de>,
Bruce Momjian <bruce@momjian.us>
Date: 2021-05-17T11:06:51Z
Lists: pgsql-hackers
> On 11 May 2021, at 09:29, Michael Paquier <michael@paquier.xyz> wrote: > FWIW, I think that the case of getting some information about any > failed connections while a connection has been successfully made > within the scope of the connection string parameters provided by the > user is rather thin, and I really feel that this is going to cause > more pain to users than this is worth it. So my vote would be to > clean up conn->errorMessage after a successful connection. Agreed, given how conservative we typically are with backwards compatibility it seems a too thin benefit to warrant potential breakage. My vote would too be to restore the behavior by clearing conn->errorMessage. -- Daniel Gustafsson https://vmware.com/
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