Help Center/ Data Warehouse Service/ User Guide/ DWS Cluster O&M/ Viewing and Subscribing to DWS Cluster Alarms/ DWS Alarm Handling/ DWS_2000000023 Vacuum Full Operation That Holds a Table Lock for a Long Time Exists in the DWS Cluster
Updated on 2026-10-16 GMT+08:00

DWS_2000000023 Vacuum Full Operation That Holds a Table Lock for a Long Time Exists in the DWS Cluster

Alarm Description

VACUUM FULL holds a level-8 lock on a table. If it holds the lock on a table for longer than 20 minutes (or another user-defined value), a major alarm is reported, indicating that the VACUUM FULL operation holds a lock for too long in the cluster. This major alarm is cleared when VACUUM FULL is complete.

Attributes

Alarm ID

Alarm Category

Alarm Severity

Alarm Type

Service Type

Auto Cleared

DWS_2000000023

Tenant plane

Important

Operation alarm

DWS

Yes

Alarm Parameters

Category

Name

Description

Location information

Name

A Vacuum Full Operation That Holds a Table Lock for A Long Time Exists in the Cluster

Type

Operation alarm

Generation time

Time when the alarm is generated

Other information

Cluster ID

Cluster details such as resourceId and domain_id

Alarm Metrics

Call the Querying Collected Data of a Specified Metric - ListMetricsData API to obtain the alarm metric. The metric name in the API is SessionStats.

  • Example request:
    GET https://{Endpoint}/v1/{project_id}/clusters/{cluster_id}/dms/metrics/SessionStats?offset=0&limit=1&from=1786782138946&to=1786785551018&order_by=ctime&sort_by=desc
  • Example response:

    The alarm metric is lock_mode whose value is not -, lock_relname whose value is not -, and stmt_type whose value is VACUUM in the response. lock_mode indicates the lock mode, lock_relname indicates the resource that is waiting for the lock, and stmt_type indicates the statement type.

    {
     "code": 0,
     "msg": "OK",
     "data": [
      {
       "virtual_cluster_id": 81882,
       "waiting": false,
       "query_id": "0",
       "backend_start": 1786782298,
       "user_name": "Ruby",
       "pid": "140504051969432",
       "resource_pool": "default_pool",
       "client_port": "20482",
       "application_name": "wlm",
       "elapsed_time": 11,
       "ctime": 1786782308000,
       "curr_xact_start": -1,
       "client_address": "172.16.114.248",
       "state": "idle",
       "lock_type": "-",
       "lock_relname": "-",
       "stmt_type": "COMMIT PREPARED",
       "query_elapsed_time": -1,
       "control_group": "",
       "query": "-",
       "query_start": 1786782298,
       "db_name": "gaussdb",
       "client_hostname": "",
       "system_query": true,
       "lock_mode": "-",
       "inst_name": "cn_5001",
       "state_change": 1786782298
      }
     ],
     "count": 743
    }

Impact on the System

Other operations fail to hold the lock on the table. As a result, workloads cannot be executed.

Possible Causes

There is a VACUUM FULL operation that holds a table lock for a long time in the cluster.

Handling Procedure

  1. In the navigation pane of the monitoring panel, choose Monitoring > Real-Time Queries > Sessions. In the session list, set the search criteria to LIKE and search for the keyword vacuum full.

  2. Check whether there is a table lock waiting for VACUUM FULL to complete by querying the locked object.

  3. Check whether the VACUUM FULL operation needs to be handled.

    1. Check whether VACUUM FULL is a system behavior and whether it affects system functions. If VACUUM FULL does not affect other service queries, wait until it is complete. The alarm will be automatically cleared.
    2. If VACUUM FULL affects normal service execution, you can find and kill related sessions on the Real-Time Queries tab and re-execute VACUUM FULL later.

Alarm Clearance

This alarm is automatically cleared when the VACUUM FULL operation is complete.