Content-Length: 277608 | pFad | http://github.com/postgrespro/postgres/commit/2beb4acff1e83fef6766a5a7d5bbd952444a0b36

52 Add diagnostic output on error in pump_until · postgrespro/postgres@2beb4ac · GitHub
Skip to content

Commit 2beb4ac

Browse files
Add diagnostic output on error in pump_until
When pump_until was moved to Utils.pm in commit 6da65a3 the diag calls were removed, this puts them back. Per request from Andres Freund. Discussion: https://postgr.es/m/20220329225819.ahk5u2tax3ez6d2t@alap3.anarazel.de
1 parent 8f2e2bb commit 2beb4ac

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/test/perl/PostgreSQL/Test/Utils.pm

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,16 @@ sub pump_until
426426
while (1)
427427
{
428428
last if $$stream =~ /$until/;
429-
return 0 if ($timeout->is_expired);
430-
return 0 if (not $proc->pumpable());
429+
if ($timeout->is_expired)
430+
{
431+
diag("pump_until: timeout expired when searching for \"$until\" with stream: \"$$stream\"");
432+
return 0;
433+
}
434+
if (not $proc->pumpable())
435+
{
436+
diag("pump_until: process terminated unexpectedly when searching for \"$until\" with stream: \"$$stream\"");
437+
return 0;
438+
}
431439
$proc->pump();
432440
}
433441
return 1;

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/2beb4acff1e83fef6766a5a7d5bbd952444a0b36

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy