I'm not getting the term crash here.. so you gonna perform some transaction then you wanted to simulate a failover.. just kill the pid of postgres.. that's the worst crash that could be simulated.
Depends on how your postgres is going to send the SIGKILL or SIGTERM signal to counterpart