All Products
Search
Document Center

AnalyticDB:DescribeWaitingSQLInfo

Last Updated:Jan 23, 2026

Queries the information about a lock-waiting query for an AnalyticDB for PostgreSQL instance.

Operation description

You can call this operation to query the details of a lock-waiting query only for an AnalyticDB for PostgreSQL V6.0 instance in elastic storage mode.

Limits

You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
gpdb:DescribeWaitingSQLInfoget
*DBInstance
acs:gpdb:*:{#accountId}:dbinstance/{#DBInstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

The ID of the instance.

Note You can call the DescribeDBInstances operation to query the instance IDs of all AnalyticDB for PostgreSQL instances in a specific region.
gp-bp12ga6v69h86****
PIDstringYes

The ID of the process that uniquely identifies the query.

Note You can call the DescribeWaitingSQLRecords operation to obtain the process IDs of lock-waiting queries.
100
DatabasestringYes

The name of the database.

test

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

B4CAF581-2AC7-41AD-8940-D56DF7AADF5B
Databasestring

The name of the database.

test
Itemsarray<object>

The queried lock-waiting query.

itemobject
PIDstring

The ID of the process that uniquely identifies the query.

100
Userstring

The database account that is used to perform the query.

testUser
SQLStmtstring

The SQL statement of the query.

Select * from t1,t2 where t1.id=t2.id;
Applicationstring

The application that sent the query.

DataGrip 2022.1.5
NotGrantLocksstring

The unauthorized locks.

AccessShareLock
BlockedByPIDstring

The process ID of the blocking query.

110
BlockedByUserstring

The database account that is used to perform the blocking query.

testUser1
BlockedBySQLStmtstring

The SQL statement of the blocking query.

Select * from t1;
BlockedByApplicationstring

The application that sent the blocking query.

DataGrip 2022.1.5
GrantLocksstring

The authorized locks.

ShareLock,AccessExclusiveLock

Examples

Sample success responses

JSONformat

{
  "RequestId": "B4CAF581-2AC7-41AD-8940-D56DF7AADF5B",
  "Database": "test",
  "Items": [
    {
      "PID": 100,
      "User": "testUser",
      "SQLStmt": "Select * from t1,t2 where t1.id=t2.id;",
      "Application": "DataGrip 2022.1.5",
      "NotGrantLocks": "AccessShareLock",
      "BlockedByPID": 110,
      "BlockedByUser": "testUser1",
      "BlockedBySQLStmt": "Select * from t1;",
      "BlockedByApplication": "DataGrip 2022.1.5",
      "GrantLocks": "ShareLock,AccessExclusiveLock"
    }
  ]
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2022-10-27Add OperationView Change Details