Instead of writing a query to psql's stdin, which can cause a failure
where psql exits before writing, reporting a write failure with a broken
pipe, this changes the logic to use -c. This was not seen in the
buildfarm as no animals with a sensitive environment are running the
kerberos tests, but let's be safe.
HEAD is able to handle the situation as of
6d41dd0 for all the test
suites doing connection checks.
f44b9b6 has fixed the same problem for
the LDAP tests.
Discussion: https://postgr.es/m/
[email protected]
Backpatch-through: 11
# need to connect over TCP/IP for Kerberos
my ($res, $stdoutres, $stderrres) = $node->psql(
'postgres',
- "$query",
+ undef,
extra_params => [
'-XAtd',
$node->connstr('postgres')
. " host=$host hostaddr=$hostaddr $gssencmode",
'-U',
- $role
+ $role,
+ '-c',
+ $query
]);
# If we get a query result back, it should be true.