Edge for Private Cloud v. 4.16.09
Perform the following during a PostgreSQL database failover:
- Stop apigee-postgresql on
the current master if it is still running:
> /<inst_root>/apigee/apigee-service/bin/apigee-service apigee-postgresql stop - Go to standby node and invoke the following command to make it the master:
> /<inst_root>/apigee/apigee-service/bin/apigee-service apigee-postgresql promote-standby-to-master IPorDNSofOldMaster
If old master is restored at some time in the future, make it a standby node:
- On the current master, edit the config file to set:
PG_MASTER=IPorDNSofNewMaster
PG_STANDBY=IPorDNSofOldMaster - Enable replication on the new master:
> /<inst_root>/apigee/apigee-service/bin/apigee-service apigee-postgresql setup-replication-on-master -f configFIle - On the old master, edit the config file to set:
PG_MASTER=IPorDNSofNewMaster
PG_STANDBY=IPorDNSofOldMaster -
Stop apigee-postgresql on the old master:> /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql stop
- On the old master, clean out any old Postgres data:
> rm -rf /<inst_root>/apigee/data/apigee-postgresql/
Note: If necessary, you can backup this data before deleting it. - Configure the old master as a standby:
> /<inst_root>/apigee/apigee-service/bin/apigee-service apigee-postgresql setup-replication-on-standby -f configFile - On completion of replication, verify the replication status by issuing the following
scripts on both servers. The system should display identical results on both servers to ensure
a successful replication:
- On the master node, run:
> /<inst_root>/apigee/apigee-service/bin/apigee-service apigee-postgresql postgres-check-master
Validate that it says it is the master. - On the standby node:
> /<inst_root>/apigee/apigee-service/bin/apigee-service apigee-postgresql postgres-check-standby
Validate that it says it is the standby.
- On the master node, run: