Book Image

PostgreSQL Replication, Second Edition

Book Image

PostgreSQL Replication, Second Edition

Overview of this book

Table of Contents (22 chapters)
PostgreSQL Replication Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Running pgpool with streaming replication


The pgpool tool can also be used with streaming instead of statement-level replication. It is perfectly fine to use PostgreSQL onboard replication and use pgpool just for load balancing and connection pooling.

In fact, it can even be beneficial to do so because you don't have to worry about side effects of functions or potential other issues. The PostgreSQL transaction log is always right, and it can be considered to be the ultimate law.

The pgpool statement-level replication was a good feature to replicate data before streaming replication was introduced into the core of PostgreSQL.

In addition to this, it can be beneficial to have just one master. The reason for this is simple. If you have just one master, it is hard to face inconsistencies. Also, the pgpool tool will create full replicas, so data has to be replicated anyway. There is absolutely no win if data must end up on both the servers anyway—writing to two nodes will not make things scale any...