In the recipe Promoting a standby to a master, we saw the steps involved in promoting a standby server. But, the procedure would be slightly different when we need to promote a specific standby in a replication cluster that consists of more than one standby server. This is because, upon the promotion of one of the standbys, the other standby servers should follow the newly promoted primary.
In this recipe, we shall discuss how to promote a standby when there exists a PostgreSQL replication cluster with multiple standby servers. To understand the steps better, we shall consider a PostgreSQL cluster with the following setup:
Master (M1) replicating to standby (S1) and standby (S2). Additionally, a cascaded standby (S3) replicating from standby (S2).
Getting ready...
In order to proceed with the procedure being illustrated here, we must have an existing PostgreSQL replication cluster that consists of a master and...