YMatrix
Quick Start
Connecting
Benchmarks
Deployment
Data Usage
Manage Clusters
Upgrade
Global Maintenance
Expansion
Monitoring
Security
Best Practice
Technical Principles
Data Type
Storage Engine
Execution Engine
Streaming Engine(Domino)
MARS3 Index
Extension
Advanced Features
Advanced Query
Resource Groups
Federal Query
Grafana
Backup and Restore
Disaster Recovery
Guide
Performance Tuning
Troubleshooting
Tools
Configuration Parameters
SQL Reference
For distributed databases with massive storage requirements, table data volumes inevitably grow over time. This growth often leads to insufficient cluster capacity and computing power (CPU). In such cases, efficient and reliable cluster expansion becomes essential. While it is ideal to plan for future growth during initial system design, it is usually impractical to over-invest in resources too early. Therefore, we recommend that you regularly plan and perform database expansion operations.
In YMatrix, you can choose between GUI-based expansion or command-line online expansion. We recommend using the GUI for its simplicity and ease of use. Currently, YMatrix supports online smooth expansion (read and write operations are unaffected during expansion) and flexible configuration of table data distribution.
Are the catalogs consistent between old and new nodes during expansion?
What is the impact on other queries during expansion?
After a failed expansion, DDL keeps reporting gpexpand in progress, catalog changes are disallowed. What should I do?
This means that after the previous expansion was interrupted, a session still holds the expansion lock. Find the session holding the lock first:
SELECT pid, state, wait_event_type, now() - xact_start AS duration, query
FROM pg_stat_activity
WHERE query ILIKE '%gp_expand_lock_catalog%' AND pid <> pg_backend_pid();
After confirming that it is the session to clean up, cancel it. The lock is released after the session's transaction rolls back:
SELECT pg_cancel_backend(pid)
FROM pg_stat_activity
WHERE query ILIKE '%gp_expand_lock_catalog%' AND pid <> pg_backend_pid();
After the lock is released, run the DDL again. Starting from 6.8.5, when the expansion tool receives a termination signal (SIGTERM), it actively cancels this session and no longer leaves it in the database.