This section covers installation and configuration of the LifeKeeper for Windows and PostgreSQL software when adding PostgreSQL to an existing LifeKeeper cluster. These steps must be followed in order.
On the Primary Server:
Use the Window Disk Management tool to configure your disk resources and define the shared or replicated volumes that you want to use. Be sure the volume size is adequate. If you are configuring shared volumes, power down the backup server during configuration to avoid simultaneous access to your storage.
It is recommended that you use Windows Explorer to unshare all volumes to be used by the PostgreSQL Instance from the network.
Configure your networking to support the LifeKeeper for Windows TCP/IP comm path(s) and the switchable IP address if applicable.
On the Backup Server:
Start the backup server if it was stopped to configure shared volumes in Step 1.
Use the Disk Management utility to configure your disk resources and define the shared or replicated volumes that you want to use. If you are using shared storage, assign the same drive letter to the shared volume as assigned on the primary server. For replicated storage be sure the volume size is adequate.
On the Primary Server:
In LifeKeeper for Windows, create your shared or replicated Volume resource (where the PostgreSQL database cluster will reside) and extend it to the backup server. Later when you create your PostgreSQL resource hierarchy, LifeKeeper for Windows will automatically bring the resource into the hierarchy as a dependency.
On the Backup Server:
Bring the volume resource hierarchy In Service using the LifeKeeper GUI.
Install the PostgreSQL software using the following guidelines:
Using the —extract-only argument to the PostgreSQL installer is not recommend as it does not configure all of the information required by the PostgreSQL Recovery Kit.
By default the installation of the PostgreSQL software creates a single database cluster (a database cluster is a collection of databases that is managed by a single instance of a running PostgreSQL database server). During installation the Data Directory prompt determines where the database cluster will be created. The location entered should be on the protected volume created above in Step 3a. The PostgreSQL software should be installed on a non-protected volume.
The database service created during installation does not configure the postmaster process to start with the port argument (-p port) which is required by the LifeKeeper for Windows PostgreSQL Recovery Kit to properly manage the instance. The Windows service (e.g. postgresql-x64-9.6 with PostgreSQL v9.6) created for the default database cluster will need to be updated to include this option if it will be protected by the LifeKeeper for Windows. See Configuring the Postmaster Port Argument for more information.
Follow the steps outlined in Configure for Unattended Connections if the pgpass.conf will be used for authentication (if setting up a trust relationship via the pg_hba.conf file this step can be skipped as that will be done as part of the configuration on the primary server).
Verify the Windows PostgreSQL database cluster will start once the installation and configuration (for the Postmaster port argument and for unattended connections) is complete. This requires stopping and restarting the default Windows Service for PostgreSQL. Once the verification is complete, stop the PostgreSQL service.
On the Primary Server:
Bring the volume resource hierarchy In Service using the LifeKeeper GUI.
Open Explorer and access the drive associated with the replicated volume.
Delete the PostgreSQL database cluster directory created during the installation on the backup server. (You will recreate it in the next step).
Install the PostgreSQL software EXACTLY as you did on the backup server (program files in the same directory on the local disk and data files in the same location on the protected volume).
Follow the steps outlined in Configuring the Portmaster Port Argument on the primary server.
Follow the steps outlined in Configure for Unattended Connections on the primary server.
When the installation is complete, start the Windows PostgreSQL service to verify that the PostgreSQL can start properly on the primary server.
Create the PostgreSQL hierarchy on the primary server and extend it to the backup server. See Creating the PostgreSQL Hierarchy for more information. Test the new PostgreSQL hierarchy by performing a manual failover.
Post your comment on this topic.