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

Creating a Concurrency Control Rule

Updated on 2025-01-02 GMT+08:00

Scenarios

You can create rules to control concurrent execution of SQL statements by specifying original SQL statements or query ID. When the number of matched SQL statements exceeds the maximum number of concurrent SQL statements allowed, the DB instance rejects the SQL statements to ensure stability. SQL statement concurrency control of RDS for PostgreSQL is implemented using Huawei-developed extension rds_pg_sql_ccl.

It can be used in the following scenarios:

  • When workloads increase sharply, the instance stability is ensured by limiting the execution of a certain type of SQL statements.
  • When there are not enough resources, the success of core tasks is ensured by limiting the execution of other SQL statements to reduce resource consumption.

Supported Versions

SQL statement concurrency control is available in the following versions:

  • RDS for PostgreSQL 15: 15.4 and later
  • RDS for PostgreSQL 14: 14.8 and later
  • RDS for PostgreSQL 13: 13.11 and later
  • RDS for PostgreSQL 12: 12.15 and later
  • RDS for PostgreSQL 11: 11.20 and later

Constraints

  • SQL statements executed by built-in users (rdsAdmin, rdsMetric, rdsRepl, and rdsBackup) are not affected by concurrency control rules.
  • To use SQL statement concurrency control, the rds_pg_sql_ccl extension must be installed. For details, see Installing and Uninstalling an Extension on the RDS Console.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and select a region.
  3. Click in the upper left corner of the page and choose Databases > Relational Database Service.
  4. On the Instances page, click the target DB instance name.
  5. In the navigation pane, choose DBA Assistant > Historical Diagnosis.
  6. Choose SQL Explorer > Concurrency Control.
  7. Toggle on the concurrency control switch .

    NOTE:

    Concurrency control rules take effect only after concurrency control is enabled.

  8. Click Add Rule. Configure the parameters listed in Table 1.

    NOTE:

    Configure SQL statement concurrency control rules based on workloads and resource usage.

    Figure 1 Creating a Concurrency Control Rule
    Table 1 Parameter description

    Parameter

    Description

    Mode

    • Original SQL Statements

      A rule created using SQL statements cannot be applied to SQL statements with bind variables.

    • Query ID

      In any given database, each rule must have a unique query ID, but rules in different databases can have the same query ID.

    Max. Concurrency

    The maximum allowed number of concurrent SQL statements that match the rule. SQL statements exceeding this upper limit will not be executed.

    The value ranges from 0 to 50000. 0 indicates that the concurrency of SQL statements is not limited.

    Max. Wait Time

    Wait time before the SQL statements can be executed. The value ranges from 0 to 1000000000.

  9. Confirm the settings and click OK.
  10. A rule is not applied immediately after being created. To apply the rule, click Enable.

Follow-up Operations

If a concurrency control rule is not required, you can disable or delete it in the Operation column.

  • To disable a rule, click Disable.
  • To delete a rule, click Delete. After a concurrency control rule that is enabled is deleted, the rule is not applied anymore.
Figure 2 Deleting a rule

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback