Fix Postgres test hang with DBD::Pg 3.5.0+ (work around RT#100648)
It is not 100% clear to me why this is happening, as the change discussed[1]
was not supposed to change behaviour outside of a transaction.
The test in question essentially does a blocking request with a timeout. The
way the default DBIC machinery works is to issue a ping() after the timeout
induced exception, in order to opossibly retry the operation IFF the link
went stale ($dbh thinks everything is in order, the RDBMS believes otherwise).
After the changes in 3.5.0 this ping() now hangs, even though the access
pattern did not change (there are no transactions involved on the handle in
question). Either way, the fix is simple: just shim-away the ping for the
duration of the test.
In general this should be resolved on a higher level by disabling retries for
the duration of the test (or maybe even disabling retries by default in the
distant feature - see RT#47005)
[1] https://rt.cpan.org/Ticket/Display.html?id=100648#txn-1438093
(cherry pick of
731c2d8b)