An attempt to create a master-master replication in PostgreSQL using dblink extension and triggers. It was just an exercise and should not be (nor it was intended to be) used in production. There are existing, mature solutions to be used for such needs, like Postgres-BDR and Bucardo.
Execute: psql < mm_replication.sql