Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem that undo tablespace does not clean up data in Innodb

2025-04-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "how to solve the problem that undo tablespace does not clean up data in Innodb". The explanation in this article is simple and clear, easy to learn and understand. Please follow the ideas of Xiaobian and go deep into it slowly to study and learn "how to solve the problem that undo tablespace does not clean up data in Innodb" together.

I. Problems

The Mysql undo cleanup parameter I used in 5.7 has been turned on. Why did the undo tablespace not clean up?

II. Analysis

This kind of problem should be the existence of a big query. After the friend killed the big query, undo still did not clean up.

-----------TRANSACTIONS-----------Trx id counter 33083158036Purge done for trx's n:o < 31961212290 undo n:o < 0 state: runningHistory list length 560689581 Author's Message: **gp_22389860**

We can understand UNDO as approximately 560689581 things that have not been released.

We know that undo allocation is circular and that cleanup should wait until the deallocate operation is complete as you can probably see from the trx_purge_truncate_history function (I just glanced at it), only if all undo headers, rollback headers. After that, the entire table space can be cleaned up.

I asked my friend to check the pressure of the current purge thread as follows:

Although no pstack is done, one can guess that the purge thread is cleaning up these undo records. When the cleanup is complete, you should be able to release undo tablespace. Then look at the information about undo in show engine as follows:

Thank you for reading, the above is the content of "how to solve the problem of no data cleaning in undo tablespace in Innodb". After studying this article, I believe everyone has a deeper understanding of how to solve the problem of no data cleaning in undo tablespace in Innodb. The specific use situation still needs to be verified by practice. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report