Skip to main content
Version 3.1.0

High Availability Proxy Configuration

Below are the necessary commands to configure the high availability proxy(ies) in the PostgreSQL Ecosystem:

Prerequisites
note

In a high availability environment, it's recommended to use servers dedicated exclusively to each component.

Command Syntax
Terminal input
    pgsmart ha proxy config [Flags]

Flags:

  • -h, --help. => Help
Non-Interactive Configuration

Non-interactive execution is disabled for this operation.

Interactive Configuration
  1. Select the PgSmart Agent (or Register new Agent).

  2. Confirm if the High Availability Agent is already configured on all PostgreSQL instances.

  3. Enter the Name of the High Availability Environment. [Default: pgsys-producao]

Instance Configuration (configure all PostgreSQL instances that make up the High Availability Environment).

  1. Enter the Identification Name of the PostgreSQL Instance Server [1].

  2. Enter the IP Address for access to the Postgresql instance [1].

  3. Enter the port for access to the PostgreSQL instance [1] [Default: 5432].

  4. Enter the High Availability Agent Port of the PostgreSQL instance [1]. [Default: 8008]

  5. Confirm if you wish to inform another PostgreSQL instance.

    note

    You can inform more than one PostgreSQL instance by confirming the need for new inclusion.

Connection Data Configuration

  1. Enter the Port for accessing PostgreSQL via the high availability proxy. [Default:5432]

Service Activation

  1. Confirm to save the settings and initialize the high availability proxy service.

    note

    To test access to the High Availability environment via proxy, use the command below:

    Terminal input
        psql -U <HA agent user> -h <Proxy IP address> -p <PostgreSQL access port via proxy> postgres

    Example:

    Terminal input
        psql -U patroni -h 192.168.200.135 -p 5432 postgres
    Figure 1 - High Availability - Proxy - add
    Figure 1 - High Availability - Proxy - add