Skip to main content
Version 3.1.0

Data Directory Configuration

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

Typically, for each instance, a directory is created in /var/lib/pgsql/VV, where VV is the major version of PostgreSQL.

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

Command Syntax
Terminal input
pgsmart cluster config [Flags]

Flags:

  • **-D, --pgdata=<path> [Default: data]. => PostgreSQL instance data directory.
  • **-M, --pgversion=(11|12|13|14|15). => major version of PostgreSQL.
  • -a, --agent= <agent>. => alias, hostname, or IP 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 cluster config

Instance Data Directories Configuration

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

  2. Select General Settings in the options menu.

  3. Select Instance Data Directories in the options menu.

When selecting the Instance Data Directories operation, the following operations are available:

  • List Instance Data Directories: Allows viewing the existing Data Directories.
  • Add an Instance Data Directory: Allows adding an Instance Data Directory.
  • Edit an Instance Data Directory: Allows editing an Instance Data Directory.
  • Remove an Instance Data Directory: Removes an Instance Data Directory.

List Instance Data Directories

  1. Select the "List" option.

    note

    The list of Instance Data Directories will be presented.

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

Add an Instance Data Directory

  1. Select the Add operation

  2. Enter the PostgreSQL data directory, the Aliasand confirm the addition.

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

Edit an Instance Data Directory

  1. Select the Edit operation

  2. Select a PostgreSQL Data Directory:

  3. Enter the data directory location, the Alias of the data directory, and confirm the edition.

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

Remove an Instance Data Directory

  1. Select the Remove operation
note

Upon selecting this action, PgSmart will provide a list of the Instance Data Directories.

  1. Select the Instance Data Directory you wish to remove

  2. Confirm the removal of the Instance Data Directory.

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