Slony Replication in PostgreSQL
I would use some proxy in front of postgresql servers.
I advise using HAProxy to proxy tcp traffic.

Example configuration might look more or less like this:

defaults
    mode tcp
    timeout connect 30s
    timeout client  90s
    timeout server  90s

frontend PGSQL-FRONT
    mode tcp
    bind *:5432
    default_backend PGSQL-BACK

backend PGSQL-BACK
    mode tcp
    balance leastconn
    option tcp-check
    tcp-check connect port 5432
    server s1 10.0.0.101:5432 check
    server s2 10.0.0.103:5432 check backup