On 10.03.2025 12:13, Ilia Evdokimov wrote: > Hi, > > After commit eaf5027 we should add information about wal_buffers_full. > > Any thoughts? > > -- > Best regards, > Ilia Evdokimov, > Tantor Labs LLC. > I think I can add it. To be honest, I haven't gotten to know this statistic yet, haven't had time to get to know this commit yet. How will this statistic help us analyze the work of the vacuum for relations?
The usecase I can see here is that we don't want autovac creating so much WAL traffic that it starts forcing other backends to have to write WAL out. But tracking how many times autovac writes WAL buffers won't help with that (though we also don't want any WAL buffers written by autovac to be counted in the system-wide wal_buffers_full: autovac is a BG process and it's fine if it's spending time writing WAL out). I think the same is true of a manual vacuum as well.
What would be helpful would be a way to determine if autovac was causing enough traffic to force other backends to write WAL. Offhand I'm not sure how practical that actually is though.
BTW, there's also an argument to be made that autovac should throttle itself if we're close to running out of available WAL buffers...