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: Hubert Zhang <zhubert@vmware.com>
Cc: "tsunakawa.takay@fujitsu.com" <tsunakawa.takay@fujitsu.com>,
"pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2021-01-11T02:56:34Z
Lists: pgsql-hackers
Attachments
- 0001-append-all-error-messages.patch (text/x-diff) patch 0001
- 0002-identify-host-more-consistently-wip.patch (text/x-diff) patch 0002
- 0003-retry-if-cannot-connect-now.patch (text/x-diff) patch 0003
- 0004-fix-unstable-ecpg-tests.patch (text/x-diff) patch 0004
I wrote: > I feel pretty good about 0001: it might be committable as-is. 0002 is > probably subject to bikeshedding, plus it has a problem in the ECPG tests. > Two of the error messages are now unstable because they expose > chosen-at-random socket paths: > ... > I don't have any non-hacky ideas what to do about that. The extra detail > seems useful to end users, but we don't have any infrastructure that > would allow filtering it out in the ECPG tests. So far the only solution that comes to mind is to introduce some infrastructure to do that filtering. 0001-0003 below are unchanged, 0004 patches up the ecpg test framework with a rather ad-hoc filtering function. I'd feel worse about this if there weren't already a very ad-hoc filtering function there ;-) This set passes check-world for me; we'll soon see what the cfbot thinks. 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