On Wed, Nov 20, 2024 at 10:41:50AM +0000, by Yang wrote: > I apologize for the obvious error in the previous patch. I have corrected it > in the new patch(v3) and pass the regression testing.
It took me quite a bit of time to evaluate the amount of the damage, and indeed sysbench has been quite good at showing the problem. It is not that much though depending on the number of tables. With map laptop and 500 tables, the cleanup of the slots showed up in sudden burts that increased the memory footprint of the WAL sender. I think that there is at least one more leak, which is even smaller than the one you have reported here. It takes a longer run time to show up with sysbench, but it's here with the WAL sender memory growing slowly over time. We should be much more careful with this area of the code in terms of memory handling. Perhaps with a broader memory context associated to the data of the cached entries, reset each time an entry is validated? This current coding style is quite dangerous to rely on. Anyway, this patch fixes a portion of the damage and Hou's method was a bit cleaner, so I have used it and applied it down to v15. -- Michael
signature.asc
Description: PGP signature