Skip to main content

Disk space usage in PostgreSQL cluster for 1C

Last update:

In cloud databases, part of the disk space is reserved for service needs:

  • for the file system - approximately 4% of the disk volume;
  • for the operating system, service components and logs - approximately 8 GB.

The reserved portion of the disk space is not available to host databases. Keep this in mind when selecting a configuration lineup.

You can monitor disk occupancy using disk occupancy notifications and metrics. Learn more about metrics in the PostgreSQL Cluster and Node Monitoring for 1C instruction.

When the cluster disk is 95% or more full, the cluster will go to DISK_FULL status and will be read-only. This is to prevent the cluster from completely locking up or becoming corrupted due to lack of free space. To make the cluster work read and write, clear the disk or scale the cluster and select a configuration with a disk size larger than the previous configuration.

Disk fullness notifications

Notifications of disk fullness are sent to the Account Owner's email and to users who are subscribed to the "Services and Services" notification category. Notifications are sent when the disk is 80% and 95% full.

Clear the disk

For your information

We do not recommend using a DELETE FROM table WHERE ... query. to clean up disk space. This query can create oversized selections on large tables and place them on disk. The remaining free disk space may run out completely, leading to problems with PostgreSQL and the need to restore it manually.

Open transaction transaction_read_only = no and remove unnecessary data using one of the queries:

  • DROP TABLE - completely deletes the table: data, structure, indexes, constraints, triggers.

    BEGIN;
    SET transaction_read_only = no;
    DROP TABLE table_name;
    COMMIT;
  • TRUNCATE TABLE - removes all rows from the table. Works faster than DELETE.

    BEGIN;
    SET transaction_read_only = no;
    TRUNCATE TABLE table_name;
    COMMIT;
  • DELETE - deletes the rows specified in the condition WHERE.