PostgreSQL Replication

1 Getting Started and Fundamentals

<- top [  up  ] - [ TOC ] 2 Installation & Configuration ->



How does PostgreSQL replication work?

(By Reto) - Let's imagine you had two identical databases on two hosts. We call one the Master and Slave the other. The Slave copies periodically (a to be defined value of seconds) the pending transactions from the Master to the Slave database.

If there are any transactions to process, the same statements will be executed immediately on the slave. If everything went well, the Slave host initiates the deletion of the pending transactions on the Master database as well and then commits the whole meta transaction. So the consistency of the Master and Slave database is assured all the time by the built-in transaction capability of Postgres.







copyright by retoh - created with mytexi