Cannot execute write statement when 'tidb_snapshot' is set

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

Original topic: can not execute write statement when ‘tidb_snapshot’ is set

| username: wfxxh

[TiDB Usage Environment] Production Environment
[TiDB Version] v5.1.1
[Encountered Problem] Unable to create table after setting ‘tidb_snapshot’

| username: xfworld | Original post link

This operation is an entire process, or if you have other scenarios that can cover this process, it cannot be omitted or skipped.

Lacking historical records, it cannot be used (the required GC time must be fully covered).

| username: 啦啦啦啦啦 | Original post link

You cannot perform write operations after setting @@tidb_snapshot. This is from the 4.0 e-book, right? I think there is an error in the documentation. I suggest using Dumpling to export and then import, as per the official documentation link provided by the expert above.

| username: db_user | Original post link

When tidb_snapshot is not an empty string, writing is not allowed. The operations you can perform are SELECT INTO OUTFILE or Dumpling --snapshot to back up the data, and then use LOAD or Lightning to restore it.

| username: wfxxh | Original post link

Take a look at my error message. The documentation is incorrect, you can verify it.

| username: kkpeter | Original post link

You can only set a snapshot, then back up the data and reinsert it.

| username: system | Original post link

This topic was automatically closed 1 minute after the last reply. No new replies are allowed.