Re: Multiple hosts in connection string failed to failover in non-hot standby mode
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: 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-06-08T03:24:31Z
Lists: pgsql-hackers
Attachments
- disable-GSS-in-ECPG-test-v2.patch (text/x-diff) patch v2
On Mon, Jun 07, 2021 at 10:38:03AM -0400, Tom Lane wrote: > Hmm. We do include "-lpgcommon -lpgport" when building the ecpg test > programs on Unix, so I'd assumed that the MSVC scripts did the same. > Is there a good reason not to make them do so? I was looking at that this morning, and yes we need to add more references here. Actually, adding only libpgport.lib allows the compilation and the tests to work, but I agree to add also libpgcommon.lib so as we don't fall into the same compilation trap again in the future. Now, I also see that using pgwin32_setenv() instead of src/port/setenv.c causes cl to be confused once we update ecpg_regression.proj because it cannot find setenv(). Bringing the question, why is it necessary to have both setenv.c and pgwin32_setenv() on HEAD? setenv.c should be enough once you have the fallback implementation of putenv() available. Attached is the patch I am finishing with, that also brings all this stuff closer to what I did in 12 and 13 for hamerkop. The failing test is passing for me now with MSVC and GSSAPI builds. Thoughts? -- Michael
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