Since the D: drive is used as a location to store PostgreSQL data when installing PostgreSQL, the volume resource must be activated on the appropriate node before installation.

Install PostgreSQL

  1. Log in to the active node (SIOS20-AD\SIOS20-NODE1) with SIOS20-AD\lkadmin.
  1. Launch the LifeKeeper GUI and activate the volume resource on the node you are logged into.
  1. Create the folder D:\pgdata as a location to store PostgreSQL data.
  1. Download the PostgreSQL (Windows x86-64) installation image from the following site, save it anywhere, and double-click to open. Version 14.7 is used here.
    https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
  1. Follow the prompts and enter the following details:
PostgreSQL
Installation Directory C:\Program Files\PostgreSQL\14 (Default value)
Component (Default value)
Data Directory D:\pgdata
Password <password>
Port 5432 (Default value)
Locale (Default value)
  1. You will be asked whether you are going to install additional components, but it is not necessary here. Uncheck the box and click Finish to exit the wizard.
  1. Start the PowerShell for administrators and execute the following command to stop the PostgreSQL service.
    Check the service.
    PS > Get-Service postgre*
    

    Stop the service.
    PS > Stop-Service -Name <postgre_service_name>
    
  1. Start regedit. (Press the Win key + R to display the Run dialog, enter regedit and click OK.)
  1. Navigate the following hierarchy in the left pane of regedit and open postgresql-x64-11.:
    \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\postgresql-x64-14
  1. Double-click and open ImagePath and add the following string to the end of Value data (the string at the bottom of the dialog), and click OK.
    -o "-p 5432"
    

  1. Rename D:\pgdata to D:\pgdata.node1.
  1. Log in to the standby node (SIOS20-AD\SIOS20-NODE2) with SIOS20-AD\lkadmin and repeat steps 2 through 10 of this section.

Edit pg_hba.conf

Edit D:\pgdata\pg_hba.conf (active node SIOS20-NODE1 only).

  1. Log in to the active node (SIOS20-AD\SIOS20-NODE1) with SIOS20-AD\lkadmin.
  1. The authentication method for database cluster administrative users must be set to “trust”. (IPv4 and IPv6) … ①
  1. The network address of the destination client must be described. …②
  1. An example is shown below.
    <Before editing>
    # IPv4 local connections:
    host    all    all    127.0.0.1/32    scram-sha-256
    # IPv6 local connections:
    host    all    all    ::1/128         scram-sha-256
    

    <After editing>
    # IPv4 local connections:
    # ①
    host    all    postgres    127.0.0.1/32    trust
    # ②
    host    all    all         10.0.1.0/24     scram-sha-256
    # IPv6 local connections:
    # ①
    host    all    postgres    ::1/128         trust
    

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment