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-10T03:15:25Z
Lists: pgsql-hackers
Michael Paquier <michael@paquier.xyz> writes: > On Wed, Jun 09, 2021 at 12:05:10PM -0400, Tom Lane wrote: >> Here's a draft patch that renames regress_ecpg_user2 to ecpg2_regression, > Using ecpg2_regression for the role goes a bit against the recent rule > to not create any role not suffixed by "regress_" as part of the > regression tests, but I am fine to live with that here. Oh dear, I forgot to check that carefully. I'd been thinking the rule was that such names must *contain* "regress", but looking at user.c, it's stricter: #ifdef ENFORCE_REGRESSION_TEST_NAME_RESTRICTIONS if (strncmp(stmt->role, "regress_", 8) != 0) elog(WARNING, "roles created by regression test cases should have names starting with \"regress_\""); #endif Meanwhile, the rule for database names is: #ifdef ENFORCE_REGRESSION_TEST_NAME_RESTRICTIONS if (IsUnderPostmaster && strstr(dbname, "regression") == NULL) elog(WARNING, "databases created by regression test cases should have names including \"regression\""); #endif So unless we want to relax one or both of those, we can't have a user name that matches the database name. Now I'm inclined to go back to the first-draft patch I had, which just dropped the first problematic test case, and added gssencmode=disable to the second one. 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