Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: br 备份恢复报错,遇到column too manys的错误

[TiDB Version] TIDB 5.4
[Encountered Problem: Phenomenon and Impact]
The TiDB backup database instance has a wide table with more than 1017 columns. Before executing the restore, the table-column-count-limit of TiDB was adjusted to 4096. However, executing br restore still encountered the “column too many” error.
Manually creating this wide table in the target database with the table-column-count-limit adjusted to 4096 is not an issue. So, are there any additional parameters that need to be set for BR backup?
[Attachment: Screenshot/Logs/Monitoring]
The error log is as follows:
I0220 06:32:24.743893 8 restore.go:90] [2023/02/20 06:32:24.743 +00:00] [ERROR] [main.go:58] [“br failed”] [error=“[ddl:1117]Too many columns”] [errorVerbose=“[ddl:1117]Too many columns\ngithub.com/pingcap/errors.AddStack\n\t/nfs/cache/mod/github.com/pingcap/errors@v0.11.5-0.20211224045212-9687c2b0f87c/errors.go:174\ngithub.com/pingcap/errors.Trace\n\t/nfs/cache/mod/github.com/pingcap/errors@v0.11.5-0.20211224045212-9687c2b0f87c/juju_adaptor.go:15\ngithub.com/pingcap/tidb/ddl.checkTableInfoValidExtra\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/ddl/ddl_api.go:1711\ngithub.com/pingcap/tidb/ddl.(*ddl).CreateTableWithInfo\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/ddl/ddl_api.go:2077\ngithub.com/pingcap/tidb/br/pkg/gluetidb.(*tidbSession).CreateTable\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/gluetidb/glue.go:146\ngithub.com/pingcap/tidb/br/pkg/restore.(*DB).CreateTable\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/restore/db.go:129\ngithub.com/pingcap/tidb/br/pkg/restore.(*Client).createTable\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/restore/client.go:415\ngithub.com/pingcap/tidb/br/pkg/restore.(*Client).GoCreateTables.func1\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/restore/client.go:468\ngithub.com/pingcap/tidb/br/pkg/restore.(*Client).createTablesWithDBPool.func1\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/restore/client.go:523\ngithub.com/pingcap/tidb/br/pkg/utils.(*WorkerPool).ApplyWithIDInErrorGroup.func1\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/utils/worker.go:82\ngolang.org/x/sync/errgroup.(*Group).Go.func1\n\t/nfs/cache/mod/golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c/errgroup/errgroup.go:57\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1371”] [stack=“main.main\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/cmd/br/main.go:58\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:225”]