[HACKERS] Testlib.pm vs msys - Mailing list pgsql-hackers

From Andrew Dunstan
Subject [HACKERS] Testlib.pm vs msys
Date
Msg-id 643abd36-2676-a1d9-4c8e-b24e9460a68e@2ndQuadrant.com
Whole thread Raw
Responses Re: [HACKERS] Testlib.pm vs msys
List pgsql-hackers
It turns out I was wrong about the problem jacana has been having with
the pg_ctl tests hanging. The problem was not the use of select as a
timeout mechanism, although I think the change to using
Time::Hires::usleep() is correct and shouldn't be reverted.

The problem is command_like's use of redirection to strings. Why this
should be a problem for this particular use is a matter of speculation.
I suspect it's to do with the fact that in this instance pg_ctl is
leaving behind some child processes (i.e. postmaster and children) after
it exits, and so on this particular path IPC::Run isn't detecting the
exit properly. The workaround I have found to work is to redirect
command_like's output instead to a couple of files and then slurp in
those files and delete them. A bit hacky, I know, so I'm open to other
suggestions.


cheers


andrew

-- 
Andrew Dunstan                https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [HACKERS] Pluggable storage
Next
From: "Mengxing Liu"
Date:
Subject: [HACKERS] [GSOC][weekly report 7] Eliminate O(N^2) scaling from rw-conflicttracking in serializable transactions