Re: Multiple hosts in connection string failed to failover in non-hot standby mode
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
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-09T02:42:08Z
Lists: pgsql-hackers
Michael Paquier <michael@paquier.xyz> writes: > On Tue, Jun 08, 2021 at 11:21:34AM -0400, Tom Lane wrote: >> IIUC, what you are proposing to do is replace pgwin32_setenv with >> src/port/setenv.c. I don't think that's an improvement. setenv.c >> leaks memory on repeat calls, because it cannot know what >> pgwin32_setenv knows about how putenv works on that platform. > Is gaur the only animal that needs this file, by the way? I think it is. setenv has been in POSIX for awhile, so probably only very old systems would need that. (This is why I don't care that much that setenv.c leaks memory. But we can't start using it on platforms where we *do* care about performance.) >> (3) Don't try to use the environment variable for this >> purpose. I'd originally tried to change test5.pgc to just >> specify gssmode=disable in-line, but that only works >> nicely for one of the two failing cases. The other one >> is testing the case of a completely defaulted connection >> target, so there's no place to add an option without >> breaking the only unique aspect of that test case. > FWIW, I'd be rather in favor of doing (3) because this remains simple > just to take care of an edge case, even if that partially breaks the > promise to rely on a default connection. Yeah, it doesn't seem like we need to test that case all that badly. I'd be okay with dropping that test; or maybe we could fix things so that the default case succeeds? regards, tom lane
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