When disk usage on any compute node exceeds a threshold, AnalyticDB for PostgreSQL locks the entire instance and makes it read-only. This topic explains the locking thresholds, how to monitor disk usage before locking occurs, and how to recover a locked instance.
Disk locking applies only to instances in elastic storage mode.
How disk locking works
The locking threshold depends on the storage capacity of each compute node:
| Compute node storage capacity | Lock triggers when |
|---|---|
| Less than 600 GB | Disk usage of any compute node exceeds 90% |
| 600 GB or more | Remaining disk space of any compute node drops below 60 GB |
When the threshold is reached, the instance becomes read-only. To prevent business disruptions, upgrade instance specifications or add nodes before disk usage reaches the threshold.
Monitor disk usage
Monitor disk usage proactively to avoid hitting the locking threshold.
View instance-level disk usage
The Maximum Compute Node Storage Usage metric on the Basic Information page shows the disk usage of the node with the largest data volume. For instances with node storage less than 600 GB, locking triggers when this metric exceeds 90%.
Log on to the AnalyticDB for PostgreSQL console.
In the upper-left corner, select the region where the instance resides.
Find the instance and click its ID.
In the Instance Status section of the Basic Information page, check the following metrics:
Metric Description Maximum Compute Node Storage Usage Disk usage of the node with the largest data volume. Locking triggers when this exceeds 90% (for instances with node storage less than 600 GB). Instance Storage Usage Average disk usage across all nodes.
View node-level disk space
For instances with node storage of 600 GB or more, locking triggers when remaining space on any node drops below 60 GB. Use node-level monitoring to track remaining disk space per node.
Log on to the AnalyticDB for PostgreSQL console.
In the upper-left corner, select the region where the instance resides.
Find the instance and click its ID.
In the left-side navigation pane, choose Monitoring and Alerts > Node Monitoring.
Click the Compute Nodes tab and view the Storage Used (MB) section.
Move the pointer over the chart to see the disk space of each compute node at a specific point in time.
Recover from disk locking
If your instance is locked, use one of the following methods to restore write access:
Upgrade instance specifications (recommended) Upgrading the instance specifications adds more disk space directly. For instructions, see Change the specifications of compute nodes.
Increase the number of nodes Adding compute nodes triggers a data redistribution across all nodes, which may reduce per-node disk usage below the locking threshold. For instructions, see Change the specifications of compute nodes. If the instance remains locked after you add nodes, Submit a ticket.