Timescale Forge contains several mechanisms for managing disk space on your services. There are four key tasks that Forge performs to handle disk space:
This section explains what the various mechanisms are, and how to best make use of them.
Timescale Forge continuously monitors the health and resource consumption of all
database services. You can check your health data by navigating to the
tab in your service dashboard. These metrics are also monitored by the Timescale
If your database exceeds a storage threshold of available resources, some automated actions are triggered, including notifications, and preventative actions.
When your disk usage exceeds certain thresholds, you will recieve email notifications. These notifications occur at:
So that you aren't overwhelmed by automated message, the alerting thresholds use low- and high-watermarks, and we limit the frequency of messages we send you about a particular service.
If your database continues to increase in size past these thresholds, automated overload protection is activated when your disk becomes 99% full. When this happens, your database is put into read-only mode, and you receive a notification on email and the Timescale Forge console shows the changed status.
When this happens, you can still query your database, but you cannot add any new data to it. This is to ensure that your disk does not fill up to 100%, which could prevent you from crashing due to an out of memory (OOM) error.
With your database in read-only mode, you need to decide if you are going to increase your storage capacity, or reduce the size of your database. When you have done that, you can also add a retention policy, or turn on compression, to avoid the problem occurring again in the future.
You can increase your storage size in the Timescale Forge console.
Servicesand click the service you want to adjust. Navigate to the
Operationstab, and go to the
Restart and applywhen you are happy with the changes.
If you need to perform actions on your database to reduce your data usage, you can turn off read-only mode. For example, you need read-write access if you want to compress data, delete rows or tables, or drop old data using data retention policies.
psqland turn off read-only protection for the current session:
SET default_transaction_read_only TO off;
SELECT add_retention_policy('<table_name>', interval '90 days');
ALTER TABLE <table_name> SET ( timescaledb.compress, timescaledb.compress_segmentby = '<type>' ); SELECT add_compression_policy('<table_name>', interval '1 day');
As soon as the storage consumption drops below the threshold, the read-only protection is automatically removed, and you can start writing data again.