# Wait till server restarts - we should get the WARNING here, but
# sometimes the server is unable to send that, if interrupted while
# sending.
ok(pump_until($monitor,\$monitor_stderr,qr/WARNING: terminating connection because of crash of another server process|server closed the connection unexpectedly/m),
"psql monitor died successfully after SIGQUIT");
$monitor->kill_kill;
$monitor->finish;
# Wait till server restarts
is($node->poll_query_until('postgres','SELECT $$restarted after sigquit$$;','restarted after sigquit'),
@ -179,8 +171,8 @@ $monitor_stderr = '';
# kill with SIGKILL this time - we expect the backend to exit, without
# being able to emit an error error message
$cnt=kill'KILL',$pid;
is($cnt,1,"exactly one process killed with KILL");
# Check that psql sees the server as being terminated. No WARNING,
# because signal handlers aren't being run on SIGKILL.
@ -189,14 +181,14 @@ SELECT 1;
];
ok(pump_until($killme,\$killme_stderr,qr/server closed the connection unexpectedly/m),
"psql query died successfully after SIGKILL");
$killme->kill_kill;
$killme->finish;
# Wait till server restarts - we should get the WARNING here, but
# sometimes the server is unable to send that, if interrupted while
# sending.
ok(pump_until($monitor,\$monitor_stderr,qr/WARNING: terminating connection because of crash of another server process|server closed the connection unexpectedly/m),
"psql monitor died successfully after SIGKILL");
$monitor->kill_kill;
$monitor->finish;
# Wait till server restarts
is($node->poll_query_until('postgres','SELECT 1','1'),"1","reconnected after SIGKILL");