Bucardo is an open source application created in 2009 by Jon Jensen.
git clone https://github.com/bucardo/bucardo
Bucardo multimaster and master/slave Postgres replication
View source