High Availability Agent Configuration
Check out the necessary commands to configure the High Availability Agent in the PostgreSQL Ecosystem below:
-
PostgreSQL Instance installed on the same server as the Agent.
In a high availability environment, it is recommended to use dedicated servers for each component.
Non-interactive execution is disabled for this operation.
-
Select the
PgSmart Agent
(or Register new Agent). -
Provide the
Name of the High Availability Environment
. -
Identify the
Server
.
- Instructions
- Video
Configuring High Availability Agent connection data:
-
Identify the
Network Interface to be used internally
by the High Availability Agent. -
Identify the
Port to be used by the High Availability Agent
.
Repository Connection Data Configuration
-
Confirm if the Distributed Configuration Repository DCS has already been configured (prerequisite):
3.1. Provide the IP address of the Distributed Configuration Repository for Client Requests.
3.2. Provide the port of the Distributed Configuration Repository for requests.
PostgreSQL Instance Connection Data Configuration
-
Provide the Instance data:
4.1. Provide the
Network Interface for monitoring
the PostgreSQL Instance. So the agent knows where the PostgreSQL instance is located and can monitor it.4.2. Provide the
Network Interface for access
in the PostgreSQL instance.4.3. Confirm the existence of the PostgreSQL instance.
4.4. Select the
Data Directory
of the PostgreSQL instance.4.5. Provide the
Transactional Logs Directory
of the instance WALDIR.4.6. Provide the
Password File Directory
(PGPASS).4.7. Confirm the existence of a MASTER PostgreSQL instance in the high availability environment.
Instance User Configuration
-
Provide the User data:
5.1. Provide the
Replication User Name
.5.2. Provide the
Replication User Password
.5.3. Confirm if the replication user (replication role) already exists in the PostgreSQL instance.
5.4. Provide the
Name of the High Availability Agent User
.5.5. Provide the
Password of the high availability Agent User
.5.6. Confirm if the high availability agent (SUPERUSER Role) already exists in the PostgreSQL instance.
Instance Operation Rules Configuration
-
Provide the operation Rules:
6.1. Confirm if the PostgreSQL instance can be promoted to MASTER in a failover.
6.2. Confirm if the PostgreSQL instance can be cloned to automatically recreate other instances (requires template(s)).
6.3. Confirm if the instance allows synchronous replication.
PostgreSQL Instance Initialization Template Configuration
-
If instance cloning is confirmed, PgSmart will proceed to the template configuration:
7.1. Provide the
Standard Character Encoding
(ENCODE).7.2. Provide the
Standard Rregional Representation
for dates and monetary values (LOCALE).7.3. Confirm the enablement of Checksum for data pages.
7.4. Select the
Network Interface for Data Replication
.7.5. Confirm if you wish to inform other PostgreSQL server(s) that make up or will make up the High Availability Environment.
7.5.1. If affirmative, inform the IP address of the server(s).
7.6. Confirm if you wish to inform the high availability environment's proxy server.
7.6.1. If affirmative, inform the IP address of the server(s).
Template Access Rules Configuration:
-
Confirm if you wish to include access rules for applications in the initialization template. If affirmative: 8.1. Select the
Type of Access Rule
.8.2. Provide the
Database(s)
.8.3. Provide the
User(s) or Group(s)
.8.4. Provide the
Hostname or IP/CIDR
with authorized access.8.5. Select the
Authentication Method
.
Template User Configuration:
-
Confirm if you wish to include users in the initialization template. If affirmative: 9.1. Provide the
User Name
.9.2. Provide the
User Password
.9.3. Select the
User Privileges
. [createrole (user creation) or createdb(database creation)]
Service Activation
-
Active the service:
10.1. Confirm to save the High Availability Agent configurations.
10.2. Confirm to create the replicator user in the PostgreSQL instance.
10.3. Confirm to create the patroni user in the PostgreSQL instance.
10.4. Confirm to set the necessary access rules for the High Availability Environment in the PostgreSQL instance.
10.5. Confirm the RELOAD of the instance to enact the access rule.
10.6. Confirm the startup of the High Availability Agent service:
Figure 1 - High Availability - Agent - add