Change PostgresNode::connect_fails() to never send down queries
authorMichael Paquier <[email protected]>
Tue, 6 Apr 2021 00:53:06 +0000 (09:53 +0900)
committerMichael Paquier <[email protected]>
Tue, 6 Apr 2021 00:53:06 +0000 (09:53 +0900)
This type of failure is similar to what has been fixed in c757a3da,
where an authentication failure combined with psql pushing a command
down its communication pipe causes a test failure.  This routine is
designed to fail, so sending a query has little sense anyway.

Per buildfarm members gaur and hoverfly, based on an analysis and fix
from Tom Lane.

Discussion: https://postgr.es/m/513200.1617634642@sss.pgh.pa.us

src/test/perl/PostgresNode.pm

index bbde34c92919e7caedb2b74d055adcfe4af6fc85..ec202f1b6e5f52b1052f870cdcb6a684883d2887 100644 (file)
@@ -1938,7 +1938,7 @@ sub connect_fails
    # have set up things properly, and this should not block.
    my ($ret, $stdout, $stderr) = $self->psql(
        'postgres',
-       "SELECT \$\$connected with $connstr\$\$",
+       undef,
        extra_params => ['-w'],
        connstr      => "$connstr");