Description of the tidb_binlog.checkpoint field

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

Original topic: tidb_binlog.checkpoint 字段说明信息

| username: xiaohetao

[TiDB Usage Environment] Production Environment
[TiDB Version] v4.0.6

Using pump/drainer for data synchronization, what does the tidb_binlog.checkpoint field in the downstream database mean?

How to check cluster_id?
In the checkpoint field of the tidb_binlog.checkpoint table, is primary-ts the source timestamp and secondary-ts the target timestamp?

| username: WalterWj | Original post link

| username: 江湖故人 | Original post link

The method to check the cluster_id is as follows:
cat {{/path/to}}/pd.log | grep "init cluster id"

| username: 小龙虾爱大龙虾 | Original post link

Field Description: clusterID - Upstream cluster ID
checkpoint - Checkpoint and tsmap information

The cluster_id can be seen from the upstream monitoring PD => Cluster panel, or it can be seen using the pdctl tool cluster command.
image

image
In the tidb_binlog.checkpoint table, is the primary-ts in the checkpoint field the source timestamp and the secondary-ts the target timestamp?
Yes.

| username: Daniel-W | Original post link

Primary-ts is the source timestamp, and secondary-ts is the target timestamp.

| username: zhang_2023 | Original post link

secondary-ts is the timestamp of the target end.

| username: 这里介绍不了我 | Original post link

  1. Explanation of the tidb_binlog.checkpoint field in the downstream database when using pump/drainer for data synchronization?
  2. How to check cluster_id?
    Use pdctl and input cluster to check.

image

| username: xiaohetao | Original post link

What method can be used to convert this timestamp to time?

| username: 这里介绍不了我 | Original post link

Use the function SELECT TIDB_PARSE_TSO();.

| username: 这里介绍不了我 | Original post link

Take a look at this: TimeStamp Oracle (TSO) in TiDB | PingCAP Documentation Center

| username: RenlySir | Original post link

pd-ctl can be used to view the cluster ID and perform TSO conversion. The mentioned select tidb_parse_tso() can also do this.

| username: system | Original post link

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