Commit 231f4879 authored by Peter Eisentraut's avatar Peter Eisentraut

Fix timeouts in PostgresNode::psql

Newer Perl or IPC::Run versions default to appending the filename to string
exceptions, e.g. the exception

    psql timed out

 is thrown as

    psql timed out at /usr/share/perl5/vendor_perl/IPC/Run.pm line 2961.

To handle this, match exceptions with !~ rather than ne.

From: Craig Ringer <craig@2ndquadrant.com>
Reviewed-by: default avatarDagfinn Ilmari Mannsåker <ilmari@ilmari.org>
parent 8f7277df
...@@ -1139,7 +1139,7 @@ sub psql ...@@ -1139,7 +1139,7 @@ sub psql
# IPC::Run::run threw an exception. re-throw unless it's a # IPC::Run::run threw an exception. re-throw unless it's a
# timeout, which we'll handle by testing is_expired # timeout, which we'll handle by testing is_expired
die $exc_save die $exc_save
if (blessed($exc_save) || $exc_save ne $timeout_exception); if (blessed($exc_save) || $exc_save !~ /^\Q$timeout_exception\E/);
$ret = undef; $ret = undef;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment