We actually set this up in a different way, using DRBD (Distributed Replicated Block Device) and protocol B.
We have two servers, located side-by-side, and a dedicated gigabit-ethernet link between them. Each server contains a RAID-1 (mirrored) array of X-25E SSDs. Using SSDs, we can disable the write-cache, and still get decent performance. We then form a DRBD array of these pairs. This is where we mount /var/lib/pgsql.
The result is extremely fast, and very robust. A transaction for Postgresql will commit when:
- it has been flushed to physical disk on the primary.
- it has reached the memory of the secondary.