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
In the navigation panel, go to Infrastructure → Instances.
Click the name of the instance.
In the navigation panel, go to Tablespaces.
In the right-top corner of the page, click Create space.
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_costparameter that will be assigned to the tablespace.random_page_cost: The value of the
random_page_costparameter that will be assigned to the tablespace.effective_io_concurrency: The value of the
effective_io_concurrencyparameter that will be assigned to the tablespace.maintenance_io_concurrency:The value of the
maintenance_io_concurrencyparameter 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 TABLESPACEcommand. You can also create a tablespace in an existing directory, provided the directory is empty.Click Save.
Viewing Tablespaces
In the navigation panel, go to Infrastructure → Instances.
Click the name of the instance.
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:
In the navigation panel, go to Infrastructure → Instances.
Click the name of the instance.
In the navigation panel, go to Tablespaces.
Click
next to the tablespace. Specify the new tablespace name.
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:
In the navigation panel, go to Infrastructure → Instances.
Click the name of the instance.
In the navigation panel, go to Tablespaces.
Click
next to the tablespace. Click Delete.