Principle: postgresql database data replication is mainly based wal log replication points in the copy mode 2 An example of a physical level replication, one is a logical table level replication.
Physical replication:
1. The core principle of the main library will write-ahead log WAL log stream to the standby database redo log received by the library after
2. Copy only for postgresql database instance
3. The primary database is readable and writable, but only read by the library
4. The database can multiple the DDL (mainly for other alert create table statement to structural changes) the copy operation
5. Calls postgresql large version must be consistent
Copy logic:
1. The core principle is based on the log WAL, logic parses WAL log copy setting rules according to the parsed file into a binary logic WAL change information of a certain format, and then transmits the main library WAL log information to the standby database by the library and then according to replicate the log wal accepted
2. Can a separate copy for database tables
3. Copy the DDL operation will not
4. Preparation of library allows read and write
The agreement does not require postgresql database version
Deployment standby database:
1. Prepare a single physical machine and a virtual machine
Large version 2. postgresql database were installed, I installed here is 11
going to work. . . To be continued