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

Handling failovers and dropping nodes


In this section, we will take a look at how failovers can be handled. We will also see how nodes can be added to and removed from a Postgres-XC setup in a safe and reliable way.

Handling node failovers

If you execute a query in Postgres-XC, it might be dispatched to many different nodes inside the cluster. For example, performing a sequential scan on a highly partitioned table will involve many different nodes. The question now is: what happens if one or some of those data nodes are down?

The answer is pretty simple—Postgres-XC will not be able to perform the requests by making use of failed nodes. This can result in a problem for both reads and writes. A query trying to fetch from a failed node will return an error indicating that no connection is available. At this point, Postgres-XC is not yet very fault tolerant. Hopefully, this will change in the future.

For you as a user, this means that if you are running Postgres-XC, you have to come up with a proper...