This topic describes how a large amount of disk usage can cause instance locking for AnalyticDB for PostgreSQL instances in elastic storage mode.

Introduction

When the disk usage of a node of an AnalyticDB for PostgreSQL instance exceeds a specific threshold, the whole instance is locked and becomes read-only.

To prevent business disruptions, you can upgrade instance specifications or add nodes before the disk usage reaches the threshold. For more information, see Upgrade instance specifications.

Check whether an instance is about to be locked

You can use the following methods to check the disk usage of an instance to determine whether the instance is about to be locked:

  • View the disk usage of the instance:

    You can view the Instance Maximum Storage Water Level value in the console. When the value exceeds 45%, the instance is locked. For information about how to view the Instance Maximum Storage Water Level value, see the View the disk usage of an instance section in this topic.

  • View the disk usage of nodes:

    You can view the disk usage of all nodes of the instance in the console. When the disk usage of a single node reaches 90%, the instance is locked. For information about how to view the disk usage of the nodes of an instance, see the View the disk usage of nodes section in this topic.

    In the following example, an instance that has 50 GB of disk space in each compute node is used. The threshold that triggers instance locking is calculated based on the following formulas:

    • High-availability Edition: (50 GB × 2) × 90% = 90 GB

      When a compute node of the instance contains 90 GB of data, the instance is locked.

      Note High-availability Edition instances are deployed in a dual-replica architecture. Therefore, the disk usage value needs to be doubled when you calculate the threshold for instance locking.
    • Basic Edition: (50 GB × 1) × 90% = 45 GB

      When a compute node of the instance contains 45 GB of data, the instance is locked.

View the disk usage of an instance

  1. Log on to the AnalyticDB for PostgreSQL console.
  2. In the upper-left corner of the console, select the region where the instance resides.
  3. Find the instance that you want to manage and click its ID.
  4. In the Configuration Information section, view the values to the right of Storage Watermark.
    Disk usage
    • Instance Maximum Storage Water Level: the disk usage of the node that contains the largest volume of data among all the nodes of the instance.
    • Instance Storage Watermark: the average disk usage of all the nodes of the instance.

View the disk usage of nodes

  1. Log on to the AnalyticDB for PostgreSQL console.
  2. In the upper-left corner of the console, select the region where the instance resides.
  3. Find the instance that you want to manage and click its ID.
  4. In the left-side navigation pane, click Monitoring and Alerts.
  5. Click the Compute Node Monitoring tab and view the Disk Usage (MB) section.
    Move the pointer over the chart to view the disk usage of compute nodes at the specific point in time. Disk usage of nodes

Solution

If your AnalyticDB for PostgreSQL instance is locked due to overwhelming disk usage, you can use the following methods to unlock the instance:

  • Upgrade instance specifications (recommended)

    You can upgrade the specifications of the instance to add more disk space.

  • Increase the number of nodes

    You can add compute nodes to the instance. After this operation, the data of the instance is redistributed across all compute nodes, which may decrease the disk usage to a value lower than the threshold. If your instance is still locked after you add nodes, Submit a ticket.

For information about how to upgrade instance specifications and increase the number of nodes, see Upgrade instance specifications.