Application level replication for PostgreSQL