When a table needs to move to a different Table Group, resharding migrates the table and its data automatically. HoloWeb provides a visual interface to create, monitor, and manage resharding tasks without writing SQL.
For background on Table Groups, shard counts, and resharding principles, see Basic Concepts.
Prerequisites
Before you begin, ensure that you have:
A Hologres instance running V2.0.24 or later. To upgrade an earlier instance or reshard manually, see (Resharding) Migrate tables to a new Table Group.
Reviewed the resharding limits in (Resharding) Migrate tables to a new Table Group.
Superuser permissions on the Hologres instance.
Stopped all write operations to the table. The table enters read-only mode during resharding.
Create a resharding task
-
Go to the HoloWeb developer page. For more information, see Connect to HoloWeb.
In the top menu bar, click Data Solutions.
In the left navigation pane, click Table Resharding.
Click Create Table Resharding Task and configure the following parameters. Leave all other parameters at their default values.
Section
Parameter
Description
Connection Information
Instance Name
The destination Hologres instance.
Database
The database in the destination instance.
Table Information
Schema
The schema to reshard.
Table
The table to reshard.
Original Table Group
Read-only. Displays the current Table Group of the selected table.
New Table Group
The Table Group to migrate the table to.
Configure GUC Parameters for Data Import
GUC Parameters
Optional. Adjust GUC parameters if memory usage is too high during data import. For details, see How to resolve out-of-memory (OOM) errors during import or export.
Click Submit. The resharding task appears in the task list on the Table Resharding page.
NoteThe Progress column displays differently by table type:
For partitioned tables, progress is based on the number of completed child partitions.
For non-partitioned tables, progress shows only 0% or 100%.
When the Status column changes to Successful, the resharding task is complete.
Handle failed tasks
During resharding, the system sets the table to read-only mode, then migrates data to a new Table Group through a temporary table. Because resharding involves data import, it can take a long time and may fail due to out-of-memory (OOM) errors or manual termination. When this happens, the task Status changes to Interrupted or Failed.
In this state, the original table remains in read-only mode. A temporary table named <initial_table_name>_xxxxxxxx also appears in the database.
Choose one of the following actions.
Resume the task
Resume a task that was interrupted by mistake or failed due to an OOM error.
If the failure was caused by an OOM error, adjust the GUC parameters first.
In the task list, click Actions > Continue to Run.
The system resumes the resharding task from its last progress point.
Cancel the task
Cancel a task to restore the table to its original state.
In the task list, click Actions > Cancel Task.
The system removes the read-only restriction and deletes the temporary table. The table returns to its initial state.