After adding a partition to a TiDB table, will the TiFlash table also be partitioned automatically?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tidb表添加分区后, 对tiflash表也会自动分区吗?

| username: TiDBer_rYOSh9JN

After adding a partition to a TiDB table, will the TiFlash table also be automatically partitioned?

| username: tidb菜鸟一只 | Original post link

The table partitioning in TiDB is essentially multiple physical tables forming a logical table. When viewed in TiFlash, it is also multiple physical tables. Therefore, after adding a partition in TiKV, a corresponding partition will also be added in TiFlash.

| username: 大飞哥online | Original post link

One-to-one correspondence

| username: ti-tiger | Original post link

After adding a partition to a TiDB table, the TiFlash table will also be automatically partitioned. However, the following points need to be noted:

  1. The partitioning of the TiFlash table is based on the partitioning of the TiDB table. Therefore, you need to create a TiFlash replica for the TiDB table first, and then add the partition.
  2. When TiDB performs an Add partition operation on a partitioned table that already has a TiFlash replica, it will block and wait after generating the partition (but it is not visible to the user). The DDL operation will only complete after TiFlash reports that the partition_id corresponding to the partition is available.
  3. To avoid query instability, the Add partition operation of the partitioned table will be blocked. The new partition will only be readable after the TiFlash replica for the new partition’s Region is ready.
| username: Kongdom | Original post link

It will automatically partition.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.