=?utf-8?Q?=C3=81lvaro?= Herrera <alvhe...@kurilemu.de> writes: > On 2025-May-11, Tom Lane wrote: >> In particular, I had not realized that autovacuum >> leaks a nontrivial amount of memory per relation processed (cf 0009), >> and apparently has done for a few releases now. This is horrid in >> databases with many tables, and I'm surprised that we've not gotten >> complaints about it.
> In PGConf Germany we got a lightning talk[1] that reported a problem > that might be explained by this: with 10 million of relations, the OOM > killer gets invoked on autovacuum workers on the reported case, so > essentially autovacuum doesn't work at all. So clearly there is somebody > that would appreciate that this problem is fixed. Interesting. > He actually blames it on relcache, but who knows how correct that is. I would not be surprised if the relcache is bloated too, but Valgrind wouldn't think that's a leak. I wonder if it'd be worth setting up a mechanism for autovacuum to drop the relcache entry for a table once it's done with it. regards, tom lane