Postgresql master slave replication with unit tests