What you are trying to do is to synchronize your data and schema across multiple (2 in your case) postgresql databases.
There are a variety of solutions to do that depending on exactly what you want to achieve. This is a good place to start - http://www.postgresql.org/docs/devel/static/high-availability.html
and the summary of the different solutions and each solution's pros and cons are listed here - http://www.postgresql.org/docs/devel/static/different-replication-solutions.html#HIGH-AVAILABILITY-MATRIX