Issue of Retaining TiDB DDL History Information

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

Original topic: tidb ddl 历史记录信息保留问题

| username: Raymond

May I ask, currently the historical records of TiDB DDL can be queried through admin show ddl jobs. Does this mean that all historical records of TiDB DDL are stored in memory, and there are no parameters to control the retention time and size of this information?

| username: ShawnYan | Original post link

Ultimately, everything is stored in TiKV. Currently, there is no parameter to control the retention period, so all DDLs will be retained.

| username: Raymond | Original post link

Is it stored in TiKV’s disk or in TiKV’s memory?

| username: h5n1 | Original post link

Keeping all DDLs for future audits and troubleshooting can be helpful. I think we should separate the storage of historical DDLs and those from the recent period.

| username: Hacker007 | Original post link

The retention function is quite significant, and this data won’t consume too many resources.