Search code examples
postgresqlreplicationpgpool

PgPool Replication - Directly insert into Master, will it replicate to the Slave


I am looking at PostgreSQL 9.4 Streaming Replication with PgPool for Load Balancing vs. using PgPool replication. Since PgPool replication is statement / middleware based does it mean that if I directly update the Master outside of PgPool it will not replicate? Will PgPool detect that the master and slave are out of sync?

Thanks in advance for your help.


Solution

  • If I directly update the Master outside of PgPool it will not replicate?

    You are correct.

    Will PgPool detect that the master and slave are out of sync?

    Sort of--it can monitor statements and check to see if all servers return the same result depending on configuration settings such as replication_stop_on_mismatch.

    Overall, pgpool replication is quite crude, you ought to use the built-in streaming replication feature unless you have a really good reason otherwise.