38.1. Creating a Cluster #

38.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):

    • Cluster name.

    • Node name: The unique name of the instance.

    • Server: The server where the instance is installed.

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

    • 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.

    • Network address and Connection port: The network address and port that the instance uses to accept 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.

    • Configuration preset: The configuration preset that is applied to the instance.

      Possible values:

      • Do not use: 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 another configuration preset to the instance later.

    • Standby node servers: Allows adding standby nodes.

      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 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 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 node for the synchronous_standby_names configuration parameter.

        • Asynchronous.

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

      5. Click Save.

    • Minimum healthy nodes: The minimum number of healthy nodes at which the cluster is considered available for replication.

      It is recommended to set this parameter to the total number of nodes.

  4. Click Create cluster.

38.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.

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

    • 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.

    • Network address and Connection port: The network address and port that the instance uses to accept 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.

    • Connection password: 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.

    • Configuration preset: The configuration preset that is applied to the instance.

      Possible values:

      • Do not use: 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 another configuration preset to the instance later.

    • Follower servers: Allows adding follower nodes.

      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 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 add a referee:

      1. From Referee, 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 that the instance uses to accept client connections.

      2. From Referee operating mode, select one of the following values:

        • referee.

        • referee_with_wal.

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

  5. Click Create cluster.

38.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):

    • Cluster name.

    • Primary node: The instance that is used as the primary node.

      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 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.

    • Standby node servers: Allows adding standby nodes.

      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 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 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 node for the synchronous_standby_names configuration parameter.

        • Asynchronous.

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

      5. Click Save.

    • Minimum healthy nodes: The minimum number of healthy nodes at which the cluster is considered available for replication.

      It is recommended to set this parameter to the total number of nodes.

  5. Click Create cluster.

38.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):

    • Cluster name.

    • Leader: The instance that is 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 that the instance uses to accept client connections.

    • Connection password: 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.

    • Follower servers: Allows adding follower nodes.

      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 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 add a referee:

      1. From Referee, 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 that the instance uses to accept client connections.

      2. From Referee operating mode, select one of the following values:

        • referee.

        • referee_with_wal.

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

  6. Click Create cluster.