Slave as a master in PostgreSQL
I would start looking at repmgr from 2ndQuadrant. It is an open source replication management framework for PostgreSQL and takes care of things like failovers.

Otherwise you need to make sure the other node is dead (shoot the other node in the head), then remove the recovery.conf and restart.  Note that at this point you will have irrevocably failed over and you cannot fail back until you set up the former master as a slave to the new master and then fail over again.