When pump_until was moved to Utils.pm in commit
6da65a3f9 the diag
calls were removed, this puts them back.
Per request from Andres Freund.
Discussion: https://postgr.es/m/
20220329225819[email protected]
while (1)
{
last if $$stream =~ /$until/;
- return 0 if ($timeout->is_expired);
- return 0 if (not $proc->pumpable());
+ if ($timeout->is_expired)
+ {
+ diag("pump_until: timeout expired when searching for \"$until\" with stream: \"$$stream\"");
+ return 0;
+ }
+ if (not $proc->pumpable())
+ {
+ diag("pump_until: process terminated unexpectedly when searching for \"$until\" with stream: \"$$stream\"");
+ return 0;
+ }
$proc->pump();
}
return 1;