Close psql processes gracefully in recovery tests
authorAndrew Dunstan <andrew@dunslane.net>
Thu, 4 Mar 2021 18:13:10 +0000 (13:13 -0500)
committerAndrew Dunstan <andrew@dunslane.net>
Thu, 4 Mar 2021 18:23:41 +0000 (13:23 -0500)
commitd3676a2e9f10a0972c6d6649235c1c7492cd6dea
tree722f808bed70c440fb60063a7b3465d0770c756c
parent040af779382e8e4797242c49b93a5a8f9b79c370
Close psql processes gracefully in recovery tests

Under windows, psql processes need to be ended explicitly, or the TAP
tests hang. However, the recovery tests were doing this via
IPC::Run::kill_kill(), which causes other major problems on Windows.

We solve this by instead sending '\q' to psql so it quits of its own
accord, and then simply waiting for it. This means we can now run almost
all the recovery tests on all Windows platforms.

Discussion: https://postgr.es/m/20210301200715.tdjpuesfzebpffgn@alap3.anarazel.de
src/test/recovery/t/011_crash_recovery.pl
src/test/recovery/t/021_row_visibility.pl