High Availability Service Installation
The PostgreSQL Ecosystem components that PgSmart integrates with to provide the high availability service are: Patroni, etcd and HAProxy.
-
Install PgSmart, observing the minimum requirements .
-
A repository of extra packages is required to resolve indirect dependencies. In accordance with the security and support policies of each organisation, Tecnisys does not provide such packages. For distributions in the Enterprise Linux family, the Extra Packages for Enterprise Linux - EPEL generally provides the necessary indirect dependencies.
-
Start the PgSmart Agent service on all machines in the database environment..
Terminal inputsystemctl start pgsmart-agent
-
Log in as the PgSmart local user, for example:
Terminal inputsu - PgSmart
-
PgSmart's PgSmart Agent Registry via PgSmart-Client.
We recommend dedicated servers for each component of the High Availability service.
The High Availability Agent, represented by the Patroni component, must be installed on the same server as the Database Service, represented by the PostgreSQL component.
pgsmart install -a <value> --service ha --ha-components={agent|dcs|proxy) [Flags]
Flags:
-M, --pgversion=(11/12/13/14/15) => Default: 15.
=> Major version of PostgreSQL, regardless of the service. The latest release of the selected major version will be used.-a, --agent= <agent>
. => Alias, hostname or IP of the server where a PgSmart Agent is installed.-h, --help
. => Help.-q, --quiet
. => Non-interactive execution to install service components. Used together with --service, --pg-major-version, --agent.--ha-components=(agent|dcs|proxy).
=> Components of the High Availability service. Used in conjunction with the --quiet, --service=ha and --agent options. Where- agent => High Availability Agent
- dcs => Distributed Configuration Repository
- proxy => High Availability Proxy
This installation mode is enabled by the quiet option (--quiet, -q) and its execution uses default values for unspecified parameters. However, this option is disabled during the first installation due to the need to create the PostgreSYS package repository based on information requested interactively.
- Command
- Video
pgsmart install =q -a <value> --service=ha --ha-components={agent|dcs|proxy)

- Instructions
- Vídeo (HA Agente Installation Example)
- Vídeo (DCS Installation Example)
- Vídeo (Proxy Installation Example)
pgsmart install
-
Select the
PgSmart Agent
(or Register a new Agent). -
Select
High Availability
service. -
Select the
Major version
of environment PostgreSQL. -
Select the
release
of the environment PostgreSQL majority version. -
Select the desired High Availability
component
to be installed (agent|dcs|proxy). -
Confirm the installation.
-
Confirm that you want to install the PostgreSYS package repository.
noteThis question will not be asked if the pgsys-utils repositories are already present or mapped on the machine.
Figure 2 - HA Installation - Interactive
Command variations for interactive installation
Some parameters can be passed in advance in the command; however, without the quiet option (--quiet, -q), the execution remains interactive, with these parameters being used with the default values in the prompts.
Examples:
pgsmart install --service=ha
pgsmart install --ha-components=agent
The installation process can be traced in the PgSmart log file:
tail -f /var/log/pgsmart-agent/pgsmart.log
tail -f /var/log/pgsmart-client/pgsmart.log
PgSmart sets environment variables (PGDATA, PGBIN, among others) in the current user's bash_profile
file that will be loaded in new sessions. If you want to load these variables immediately, execute the command below after the installation:
source ~/.bash_profile