34.1. Creating a Cluster #

34.1.1. Creating a New Standard Primary-Standby Cluster #

When creating a new standard primary-standby cluster, you must specify the parameters of the instance that will be created and used as the primary node.

To create a new standard primary-standby cluster:

  1. In the navigation panel, go to InfrastructureClusters.

  2. In the top-right corner of the page, click Create cluster, and then Next.

  3. Specify parameters of the new standard primary-standby cluster (parameters marked with an asterisk are required):

    • Node name: The unique name of the instance.

    • Server: The server where the instance is installed.

    • System user: The operating system user that owns instance files and catalogs and on behalf of which the instance service runs. In most cases, it is the postgres user.

      Ensure that the specified user exists in the operating system.

    • Data directory: The path to the server directory where the main instance directories and files are located.

    • Connection address and Connection port: The network address and port number that the instance will use for receiving client connections.

    • Authentication method: The authentication method that the instance uses to verify users when receiving client connections.

      Possible values:

      • scram-sha-256.

      • md5.

      • trust: Do not perform authentication.

        It is recommended to select this value only for test environments.

    • DB superuser and DB superuser password: The name and password of the DBMS user that is created and on behalf of which the agent connects to the instance.

      The default username is postgres.

    • Preset: The configuration preset that will be applied to the instance.

      Possible values:

      • Do not use preset: Do not apply a configuration preset to the instance.

      • Settings for 1C: Apply the 1C configuration preset to the instance.

      • Settings for OLTP: Apply the OLTP (Online Transaction Processing) configuration preset to the instance.

      You can apply a new configuration preset later.

    • Servers of standby nodes: Allows adding standby nodes to the standard primary-standby cluster.

      It is recommended to have an odd number of nodes to ensure a quorum.

      To add a standby node:

      1. Click Add servers.

      2. From Server, select a server to install the instance.

        When the server is selected, the following instance information is displayed:

        • Data directory: The path to the server directory where the main instance directories and files are located.

        • Network address and Port: The network address and port number that the instance uses to accept client connections.

      3. In Replication mode, select one of the following values:

        • Synchronous

          For this value, in Node identifier, enter the unique name of the node for the synchronous_standby_names configuration parameter.

        • Asynchronous

      4. (Optional) To add more standby nodes, click Add server.

      5. Click Save.

  4. Click Create cluster.

34.1.2. Creating a New BiHA Cluster #

When creating a new BiHA cluster, you must specify the parameters of the instance that will be created and used as the leader node.

Before performing this instruction, satisfy the required prerequisites for setting up a BiHA cluster.

To create a new BiHA cluster:

  1. In the navigation panel, go to InfrastructureClusters.

  2. In the top-right corner of the page, click Create cluster.

  3. In Failover manager, select BiHA, and then click Next.

  4. Specify parameters of the new BiHA cluster (parameters marked with an asterisk are required):

    • Cluster name.

    • Node name: The unique name of the instance.

    • Server: The server where the instance is installed.

    • System user: The operating system user that owns instance files and catalogs and on behalf of which the instance service runs. In most cases, it is the postgres user.

      Ensure that the specified user exists in the operating system.

    • Data directory: The path to the server directory where the main instance directories and files are located.

    • Connection address and Connection port: The network address and port number that the instance will use for receiving client connections.

    • Authentication method: The authentication method that the instance uses to verify users when receiving client connections.

      Possible values:

      • scram-sha-256.

      • md5.

      • trust: Do not perform authentication.

        It is recommended to select this value only for test environments.

    • DB superuser and DB superuser password: The name and password of the DBMS user that is created and on behalf of which the agent connects to the instance.

      The default username is postgres.

    • Password for connection: The password for the biha_replication_user role. This role is used for connecting follower nodes to the leader node.

      For more information, refer to the official Postgres Pro documentation on BiHA roles.

    • Preset: The configuration preset that will be applied to the instance.

      Possible values:

      • Do not use preset: Do not apply a configuration preset to the instance.

      • Settings for 1C: Apply the 1C configuration preset to the instance.

      • Settings for OLTP: Apply the OLTP (Online Transaction Processing) configuration preset to the instance.

      You can apply a new configuration preset later.

    • Servers of followers: Allows adding follower nodes to the BiHA cluster.

      It is recommended to have an odd number of nodes to ensure a quorum.

      To add a follower node:

      1. Click Add servers.

      2. From Server, select a server to install the instance.

        When the server is selected, the following instance information is displayed:

        • Data directory: The path to the server directory where the main instance directories and files are located.

        • Network address and Port: The network address and port number that the instance uses to accept client connections.

      3. (Optional) To add more follower nodes, click Add server.

      4. Click Save.

    • Referee: Allows adding a referee to the BiHA cluster.

      To add a referee:

      1. From Referee, select a server to install the instance.

        When the server is selected, the following instance information is displayed:

        • Data directory: The path to the server directory where the main instance directories and files are located.

        • Network address and Port: The network address and port number that the instance uses to accept client connections.

      2. Select Referee operating mode. There are referee and referee_with_wal operating modes available.

        For more information, refer to the official Postgres Pro documentation on the referee node in the BiHA cluster.

  5. Click Create cluster.

34.1.3. Creating a Standard Primary-Standby Cluster from an Existing Instance #

Before performing this instruction, create an instance.

To create a standard primary-standby cluster from an existing instance:

  1. In the navigation panel, go to InfrastructureClusters.

  2. In the top-right corner of the page, click Create cluster.

  3. In Creation mode, select From instance, and then click Next.

  4. Specify parameters of the new standard primary-standby cluster (parameters marked with an asterisk are required):

    • Primary node: The instance that will be used as the primary node of the standard primary-standby cluster.

      When the instance is selected, the following information is displayed:

      • Version and edition: The Postgres Pro version and edition installed on the instance server.

      • Data directory: The path to the server directory where the main instance directories and files are located.

      • Network address and Port: The network address and port number that the instance uses to accept client connections.

      • User: The name of the DBMS superuser on behalf of which the agent connects to the instance.

    • Servers of standby nodes: Allows adding standby nodes to the standard primary-standby cluster.

      It is recommended to have an odd number of nodes to ensure a quorum.

      To add a standby node:

      1. Click Add servers.

      2. From Server, select a server to install the instance.

        When the server is selected, the following instance information is displayed:

        • Data directory: The path to the server directory where the main instance directories and files are located.

        • Network address and Port: The network address and port number that the instance uses to accept client connections.

      3. From Replication mode, select one of the following values:

        • Synchronous

          For this value, in Node identifier, enter the unique name of the standby node for the synchronous_standby_names configuration parameter.

        • Asynchronous

      4. (Optional) To add more standby nodes, click Add server.

      5. Click Save.

  5. Click Create cluster.

34.1.4. Creating a BiHA Cluster from an Existing Instance #

Before performing this instruction, satisfy the required prerequisites for setting up a BiHA cluster.

To create a BiHA cluster from an existing instance:

  1. In the navigation panel, go to InfrastructureClusters.

  2. In the top-right corner of the page, click Create cluster.

  3. In Creation mode, select From instance.

  4. In Failover manager, select BiHA, and then click Next.

  5. Specify parameters of the new BiHA cluster (parameters marked with an asterisk are required):

    • Leader: The instance that will be used as the leader node of the cluster.

      When the instance is selected, the following information is displayed:

      • Version and edition: The Postgres Pro version and edition installed on the instance server.

      • Data directory: The path to the server directory where the main instance directories and files are located.

      • Network address and Port: The network address and port number that the instance uses to accept client connections.

    • Password for connection: The password for the biha_replication_user role. This role is used for connecting follower nodes to the leader node.

      For more information, refer to the official Postgres Pro documentation on BiHA roles.

    • Servers of followers: Allows adding follower nodes to the BiHA cluster.

      It is recommended to have an odd number of nodes to ensure a quorum.

      To add a follower node:

      1. Click Add servers.

      2. From Server, select the server where the instance is installed.

        When the server is selected, the following instance information is displayed:

        • Data directory: The path to the server directory where the main instance directories and files are located.

        • Network address and Port: The network address and port number that the instance uses to accept client connections.

      3. (Optional) To add more follower nodes, click Add server.

      4. Click Save.

  6. Click Create cluster.