Removing the PostgreSQL High Availability Setup with Secondary Server and Read-Only Server Continuity
This help document explains how to remove the High Availability (HA) setup configured using PostgreSQL. Based on your deployment model, follow the appropriate steps to remove either the Secondary Server or the Read-Only (RO) Server configuration.
- Removing the Secondary Server Configuration
- Removing the RO Server Configuration
1. Removing the Secondary Server
Uninstall the PAM360 application from the configured secondary server, and then follow the steps below on the primary server:
- Stop the PAM360 service.
- Open the command prompt, navigate to the <PAM360-Installation-Directory>/bin folder, and execute the following command based on your operating system:
- Windows
DeleteAppServer.bat <Hostname/IP Address-Of-Secondary-Server>
- Linux
sh DeleteAppServer.sh <Hostname/IP Address-Of-Secondary-Server>
- Execute the following command with administrator/root (sudo) privileges, depending on your operating system:
- Windows
unregister_pgdbservice.bat <Service-name-of-the PAM360-Database>
- Linux
sh unregister_pgdbservice.sh <Service-name-of-the PAM360-Database>
- Navigate to the <PAM360-Installation-Directory>/conf folder, open the customer-config.xml file using any text editor, and change the status of the StartDBServer property from false to true.
- Navigate to the <PAM360-Installation-Directory/pgsql/data> folder, open the pg_hba.conf file using any text editor, and remove the following entry to revoke the secondary server's access from the primary database:
- host all pmpuser <IP-Address-Of-Secondary-Server>/32 md5
- Now, start the PAM360 service.
You have successfully removed the secondary server from your HA architecture.
2. Removing the Read-Only Server
Uninstall the PAM360 application from the configured RO server, and then follow the steps below on the primary server:
- Stop the PAM360 service.
- Open the command prompt, navigate to the <PAM360-Installation-Directory>/bin folder, and execute the following command to delete an existing Read-Only server:
- Windows
<PAM360-Installation-Directory>\bin\DeleteROServerIP.bat <RO_IP_Address>
- Linux
<PAM360-Installation-Directory>/bin/DeleteROServerIP.sh <RO_IP_Address>
- Execute the following command to delete the replication slot configured for the Read-Only server:
- Windows
<PAM360-Installation-Directory>\bin\DeleteSlot.bat <RO_Slot_Name>
- Linux
<PAM360-Installation-Directory>/bin/DeleteSlot.sh <RO_Slot_Name>
- Navigate to the <PAM360-Installation-Directory/pgsql/data> folder, open the pg_hba.conf file with any text editor, and remove the following entry to revoke the Read-Only server's access to the primary database:
- host replication <Replication-Username> <IP-Address-of-RO-Server>/32 md5
- Now, start the PAM360 service.