5.8. Tablespaces #

Tablespaces allow you to manage how database object files are located within the file system. A tablespace can store individual tables, indexes, and entire databases.

For more information about tablespaces, refer to the official Postgres Pro documentation.

This section explains how to manage tablespaces. It includes the following instructions:

Creating a Tablespace

  1. In the navigation panel, go to InfrastructureInstances.

  2. Click the name of the instance.

  3. In the navigation panel, go to Tablespaces.

  4. In the right-top corner of the page, click Create space.

  5. Enter parameters of the new tablespace (parameters marked with an asterisk are required):

    • Instance: The instance to which the tablespace will be assigned.

      The value is entered automatically.

    • Name.

    • Catalog: The path to the directory where the tablespace will be located.

    • Owner: The DBMS user who will own the tablespace.

    • seq_page_cost: The value of the seq_page_cost parameter that will be assigned to the tablespace.

    • random_page_cost: The value of the random_page_cost parameter that will be assigned to the tablespace.

    • effective_io_concurrency: The value of the effective_io_concurrency parameter that will be assigned to the tablespace.

    • maintenance_io_concurrency:The value of the maintenance_io_concurrency parameter that will be assigned to the tablespace.

    • сompression: The use of the Compressed File System.

      Possible values:

      • zstd

      • lz4

      • pglz

      • zlib

      This functionality is available only in the Postgres Pro Enterprise edition.

    When creating a tablespace, a directory is created in the file system, and the tablespace is then created using the CREATE TABLESPACE command. You can also create a tablespace in an existing directory, provided the directory is empty.

  6. Click Save.

Viewing Tablespaces

  1. In the navigation panel, go to InfrastructureInstances.

  2. Click the name of the instance.

  3. In the navigation panel, go to Tablespaces.

The table of tablespaces with the following columns will be displayed:

  • Name.

  • Instance: The instance where the tablespace is created.

  • Owner: The DBMS user who owns the tablespace.

  • Path: The directory of the tablespace in the file system.

  • Configuration parameters: Additional configuration parameters specific to tablespaces.

  • Size: The total size of objects within the tablespace.

  • Actions.

    For more information about available actions, refer to other instructions in this section.

Renaming a Tablespace

Tablespaces can be renamed. When renaming a tablespace, the ALTER TABLESPACE SQL command is executed.

Important

System tablespaces cannot be renamed.

To rename a tablespace:

  1. In the navigation panel, go to InfrastructureInstances.

  2. Click the name of the instance.

  3. In the navigation panel, go to Tablespaces.

  4. Click Edit next to the tablespace.

  5. Specify the new tablespace name.

  6. Click Save.

Deleting a Tablespace

When deleting a tablespace, the DROP TABLESPACE SQL command is executed.

Important

  • Deleted tablespaces cannot be restored.

  • System tablespaces cannot be deleted.

  • You can only delete empty tablespaces.

To delete a tablespace:

  1. In the navigation panel, go to InfrastructureInstances.

  2. Click the name of the instance.

  3. In the navigation panel, go to Tablespaces.

  4. Click Delete next to the tablespace.

  5. Click Delete.