Skip to main content
Version Next

Connection Pool Installation

PgSmart enables connection pooling by integrating with PgBouncer, a lightweight connection pooler for PostgreSQL.

Prerequisites
  • PgSmart CLI must be installed, after meeting the minimum requirements.

  • Additional package repository to resolve indirect dependencies. According to each organization's security and support policies, Tecnisys does not provide such packages. However, for Enterprise Linux family distributions, the Extra Packages for Enterprise Linux - EPEL generally provides the necessary indirect dependencies.

  • The PgSmart Agent service must be started on all database nodes.

    Terminal input
        systemctl start pgsmart-agent
  • Access with the local PgSmart user. For example:

    Terminal input
        su - pgsmart
  • PgSmart Agents Registration via the PgSmart Client.

Command Syntax
Terminal input
    pgsmart install -s pool [Flags]
Terminal input
    pgsmart install --service=pool [Flags]

Flags:

  • -M, --pg-version=11–17 => Defines the PostgreSQL major version to install. The latest available release will be used.
  • -a, --agent=<value> => Alias, hostname, or IP where a PgSmart Agent is installed.
  • -h, --help => Displays help.
  • -q, --quiet => Non-interactive execution for service installation. Used with --service, --pgversion, and --agent options.
  • -s, --service=pool => PostgreSYS Platform Connection Pool Service.
Non-Interactive Installation

This installation mode is activated by the quiet option (--quiet, -q) and uses default values for parameters not provided. However, it is disabled on the first installation, as repository creation requires interactive input.

Terminal input
    pgsmart install -q -a <agent> --service=pool
Figure 1 - Pool Installation - Non-Interactive
Figure 1 - Pool Installation - Non-Interactive
Interactive Installation
Terminal input
    pgsmart install
  1. Select the PgSmart Agent (or register a new one).

  2. Select the Pool de Conexões service (be sure to deselect the default Banco de Dados option).

  3. Select the PostgreSQL major version.

  4. Select the release of the major version.

  5. Confirm the installation.

  6. Confirm whether to install/update the PostgreSYS Package Repository.

    6.1 If yes, select Provide and enter:

    • Repository URL

    • Identification code

    • Repository name

    • Access user (optional if different from Tecnisys default)

    • Access password (optional if different from Tecnisys default)

    • Confirm GPG key verification

      • If yes, provide the path to the GPG key file

        note
        • For a local installation, remember to download and import the repository public GPG key (RPM-GPG-KEY-PGSYS).

        For RHEL 8 distributions:

        File path
            https://repo.tecnisys.com.br/repository/yum/pgsys/repos/4.0.0/rhel-8-x86_64/RPM-GPG-KEY-PGSYS
        • Compressed package files (tar.gz) already include the GPG public key.
        Figure 2 - Pool Installation - Interactive
        Figure 2 - Pool Installation - Interactive

Command Variations for Interactive Installation

Some parameters can be pre-passed; however, the execution remains interactive, and prompts will request confirmation and defaults for others.

Examples:

Terminal input
    pgsmart install --service=pool
Terminal input
    pgsmart install --service=pool --pg-version=15
Final Notes
note

PgSmart defines environment variables (PGDATA, PGBIN, etc.) in the current user's bash_profile, which are loaded into new sessions. Run the following command to apply them immediately:

Terminal input
    source ~/.bash_profile