On 2025-01-24 Fr 1:59 PM, Dagfinn Ilmari Mannsåker wrote:
Tom Lane <t...@sss.pgh.pa.us> writes:
Michael Paquier <mich...@paquier.xyz> writes:
On Thu, Jan 23, 2025 at 08:25:45PM +0000, Dagfinn Ilmari Mannsåker wrote:
Here's a patch for that.
Thanks. I had a bit of time today and applied it.
BF member drongo doesn't like the new test for amcheck.
Looks like it has to do with SSPI authentication producing
a different error than expected:
Ah yes, I always forget about that quirk on Windows.
stderr:
# Failed test 'checking with a non-existent user stderr /(?^:role
"no_such_user" does not exist)/'
# at C:/prog/bf/root/HEAD/pgsql/src/bin/pg_amcheck/t/002_nonesuch.pl line 86.
# 'pg_amcheck: error: connection to server at "127.0.0.1", port 19928
failed: FATAL: SSPI authentication failed for user "no_such_user"
# '
# doesn't match '(?^:role "no_such_user" does not exist)'
# Looks like you failed 1 test of 107.
You might be able to work around this with auth_extra,
a la 1e3f461e8 and other past fixes.
Here's a (blind, but at least doesn't break on Linux) patch for that.
- ilmari
This seems to me like the wrong fix. We don't want to create
"no_such_user" I think, we just want to catch the Windows error message,
as in this patch.
cheers
andrew
--
Andrew Dunstan
EDB: https://www.enterprisedb.com
diff --git a/src/bin/pg_amcheck/t/002_nonesuch.pl b/src/bin/pg_amcheck/t/002_nonesuch.pl
index 2697f1c1b1a..1c6103eae3f 100644
--- a/src/bin/pg_amcheck/t/002_nonesuch.pl
+++ b/src/bin/pg_amcheck/t/002_nonesuch.pl
@@ -87,7 +87,7 @@ $node->command_checks_all(
[ 'pg_amcheck', '--username' => 'no_such_user', 'postgres' ],
1,
[qr/^$/],
- [qr/role "no_such_user" does not exist/],
+ [qr/role "no_such_user" does not exist|SSPI authentication failed for user "no_such_user"/],
'checking with a non-existent user');
#########################################