pgpool could be used as a replication server. This allows real-time
backuping of the database to avoid disk failures. pgpool sends
- exactly same query to each PostgreSQL servers to accomplish
- replication. So pgpool can be regarded as a "synchronous
+ exactly the same updating queries to each PostgreSQL servers to
+ accomplish replication. So pgpool can be regarded as a "synchronous
replication server". Currently pgpool supports up to 2 PostgreSQL
servers.
the live server to the dead server. Once the DB contents match you
start the two postmaster then restart pgpool.
+ While pgpool is in the replication mode, SELECT queries are sent to
+ the master node only. If the load balancing is enabled, SELECT's
+ are sent to randomly chosen node. If you need to replicate a SELECT
+ query which has a side effect of updaing some data, append the
+ following comment at the beginning of the query.
+
+ /*REPLICATION*/ SELCT ...
+
+ Note that queries that begin with either "SELECT nextval" or
+ "SELECT setval" are automatically replicated.
+
1.2 Avoiding deadlocks
pgpool could send a query to the "master" server then send to