5.10. Schemas #
This section explains how to manage schemas. It contains the following instructions:
Creating a Schema
In the navigation panel, go to Databases.
(Optional) To display system databases, turn on Show system databases.
Click the name of the database.
In the top-right corner of the page, click Create schema.
Enter parameters of the new schema (parameters marked with an asterisk are required):
Name.
Owner.
lock_timeout, s: Abort any statement that waits longer than the specified time while attempting to acquire a lock on a table, index, row, or other database object. The time limit applies separately to each lock acquisition attempt.
For more information about this parameter, refer to the official Postgres Pro documentation.
Click Create.
Viewing Schemas
In the navigation panel, go to Databases.
(Optional) To display system databases, turn on Show system databases.
Click the name of the database.
The table of schemas with the following columns will be displayed:
Schemas: The unique name of the schema.
Total size.
The horizontal indicator displays the size of tables, bloat, and indexes.
Owner.
Tables:
the number of tables
the size of tables
the table bloat percentage
Indexes:
the number of indexes
the size of indexes
the index bloat percentage
Actions.
For more information about available actions, refer to other instructions in this section.
The size of the schema objects is calculated as the total sum of all its relational objects.
Important
If a schema is created outside PPEM, the information about it can be displayed in the web application with a delay. The delay duration depends on the agent configuration. By default, it is one minute.
Editing a Schema
In the navigation panel, go to Databases.
(Optional) To display system databases, turn on Show system databases.
Click the name of the database.
Click
next to the schema. Edit schema parameters.
Click Save.
Deleting a Schema
The DROP SCHEMA SQL command is executed when deleting a schema.
Important
Deleted schemas cannot be restored.
To delete a schema:
In the navigation panel, go to Databases.
(Optional) To display system databases, turn on Show system databases.
Click the name of the database.
Click
next to the schema. (Optional) To delete all dependent objects of the schema, turn on Cascade deletion.
Click Delete.
Confirm the operation.