Esta página ainda não está disponível no idioma selecionado. Estamos trabalhando para adicionar mais opções de idiomas. Agradecemos sua compreensão.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
Software Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

Show all

PGXC_WAIT_DETAIL

Updated on 2024-12-18 GMT+08:00

PGXC_WAIT_DETAIL displays detailed information about the SQL waiting hierarchy of all nodes in a cluster. This view is supported only by clusters of version 8.1.3.200 or later.

Table 1 PGXC_WAIT_DETAIL columns

Name

Type

Description

level

integer

Level in the wait hierarchy. The value starts with 1 and increases by 1 when there is a wait relationship.

lock_wait_hierarchy

text

Wait hierarchy, in the format of Node name: Process ID->Node name:Waiting process ID->Node name:Waiting process ID->...

node_name

text

Node name

db_name

text

Database name

thread_name

text

Thread name

query_id

bigint

ID of a query statement

tid

bigint

Thread ID of the current thread

lwtid

integer

Lightweight thread ID of the current thread

ptid

integer

Parent thread of the streaming thread

tlevel

integer

Level of the streaming thread

smpid

integer

Concurrent thread ID

wait_status

text

Waiting status of the current thread

wait_event

text

Virtual ID of the transaction holding or awaiting this lock

exec_cn

boolean

SQL execution CN

wait_node

text

Lock level

query

text

Query statement

application_name

text

Name of the application connected to the backend

backend_start

timestamp with time zone

Startup time of the backend process, that is, the time when the client connects to the server

xact_start

timestamp with time zone

Start time of the current transaction

query_start

timestamp with time zone

Start time of the active query

waiting

boolean

Waiting status

state

text

Overall state of the backend

waittime

timestamp with time zone

Timestamp when the lock wait starts.

This column is available only in clusters of version 9.1.0.200 or later.

holdtime

timestamp with time zone

Timestamp when the lock starts to be obtained.

This column is available only in clusters of version 9.1.0.200 or later.

Example

  1. Connect to the CN, start a transaction, and perform the update operation.

    1
    begin;update td set c2=6 where c1=1;
    

  2. Open another window to connect to the CN, start another transaction, and perform the update operation. (Do not update the same record concurrently.)

    1
    begin;update td set c2=6 where c1=7;
    

    In this case, the update operation is blocked.

  3. Open another window to connect to the CN node and create an index.

    1
    create index c2_key on td(c2);
    

  4. Run the select * from pgxc_wait_detail; command.

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    SELECT * FROM PGXC_WAIT_DETAIL;
    level |                lock_wait_hierarchy                 | node_name | db_name  | thread_name |     query_id      |       tid       | lwtid  | ptid | tlevel | sm
    pid | wait_status  | wait_event | exec_cn | wait_node |                 query                  | application_name |         backend_start         |          xact_st
    art           |          query_start          | waiting | state
    -------+----------------------------------------------------+-----------+----------+-------------+-------------------+-----------------+--------+------+--------+---
    ----+--------------+------------+---------+-----------+----------------------------------------+------------------+-------------------------------+-----------------
    --------------+-------------------------------+---------+--------
    1 | cn_5001:139870843444360                            | cn_5001   | postgres | workload    | 73183493945299462 | 139870843444360 | 578531 |      |      0 |
    0 | wait node    |            | t       |           | WLM fetch collect info from data nodes | workload         | 2023-03-13 13:56:56.611486+08 | 2023-03-14 11:54
    :33.562808+08 | 2023-03-13 13:57:00.262736+08 | t       | active
    1 | cn_5001:139870843654544                            | cn_5001   | postgres | gsql        | 73183493945299204 | 139870843654544 | 722259 |      |      0 |
    0 | wait node    |            | t       |           | update td set c2=6 where c1=1;         | gsql             | 2023-03-14 11:52:05.176588+08 | 2023-03-14 11:52
    :19.054727+08 | 2023-03-14 11:53:58.114794+08 | t       | active
    1 | cn_5001:139870843655296                            | cn_5001   | postgres | gsql        | 73183493945299218 | 139870843655296 | 722301 |      |      0 |
    0 | wait node    |            | t       |           | update td set c2=6 where c1=7;         | gsql             | 2023-03-14 11:52:08.084265+08 | 2023-03-14 11:52
    :42.978132+08 | 2023-03-14 11:53:59.459575+08 | t       | active
    1 | cn_5001:139870843656424                            | cn_5001   | postgres | gsql        | 73183493945299223 | 139870843656424 | 722344 |      |      0 |
    0 | acquire lock | relation   | t       |           | create index c2_key on td(c2);          | gsql             | 2023-03-14 11:52:10.967028+08 | 2023-03-14 11:52
    :53.463227+08 | 2023-03-14 11:54:00.25203+08  | t       | active
    2 | cn_5001:139870843656424 -> cn_5001:139870843655296 | cn_5001   | postgres | gsql        | 73183493945299218 | 139870843655296 | 722344 |      |        |
    |              |            | f       |           | update td set c2=6 where c1=7;         | gsql             | 2023-03-14 11:52:08.084265+08 | 2023-03-14 11:52
    :42.978132+08 | 2023-03-14 11:53:59.459575+08 | t       | active
    (5 rows)
    

Usamos cookies para aprimorar nosso site e sua experiência. Ao continuar a navegar em nosso site, você aceita nossa política de cookies. Saiba mais

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback