Skip to main content
Version Next

PostgreSQL Data Directories Configuration

The Data Directory (PGDATA) is the absolute path where the data and other files of a specific PostgreSQL instance are stored.

Usually, for each instance, a directory is created under /var/lib/pgsql/VV, where VV refers to the PostgreSQL major version.

On the same machine, multiple instances of the same or different PostgreSQL versions can be initialized, each with its own Data Directory and Connection Port.

Command Syntax
Terminal input
    pgsmart db config [Flags]

Flags:

  • -D, --pgdata=<path> [Default: data]. => PostgreSQL instance Data Directory.
  • -M, --pgversion=(11|12|13|14|15). => PostgreSQL major version.
  • -a, --agent=<agent>. => Alias, hostname or IP address of the server where a PgSmart Agent is installed.
  • -h, --help. => Help
Non-Interactive Configuration

Non-interactive execution is disabled for this operation.

Interactive Configuration
Terminal input
    pgsmart db config

Instance Data Directories Configuration

  1. Select the PgSmart Agent (or Register a new Agent).

  2. Select Configurações dos Diretórios from the options menu.

  3. Select Diretórios de Dados das Instâncias from the options menu.

Upon selecting Diretórios de Dados das Instâncias, the following operations are available:

  • Listar: Allows viewing already existing Data Directories.
  • Adicionar: Allows adding a new Instance Data Directory.
  • Editar: Allows editing an existing Instance Data Directory.
  • Remover: Removes an existing Instance Data Directory.

List Instance Data Directories

  1. Select the Listar option.
note

The list of registered Instance Data Directories will be displayed.

Figure 1 - Data Directory - List
Figure 1 - Data Directory - List

Add an Instance Data Directory

  1. Select the Adicionar operation.

  2. Enter the PostgreSQL Data Directory, the Alias, and confirm the addition.

Figure 2 - Data Directory - Add
Figure 2 - Data Directory - Add

Edit an Instance Data Directory

  1. Select the Editar operation.

  2. Select a PostgreSQL Data Directory.

  3. Enter the Data Directory location, the Alias, and confirm the edit.

Figure 3 - Data Directory - Edit
Figure 3 - Data Directory - Edit

Remove an Instance Data Directory

  1. Select the Remover operation.
note

The list of Instance Data Directories will be displayed for selection.

  1. Select the Instance Data Directory you want to remove.

  2. Confirm the removal.

Figure 4 - Data Directory - Remove
Figure 4 - Data Directory - Remove