On Thu, Nov 20, 2025 at 11:34 AM Sami Imseih <[email protected]> wrote: > I think it would be difficult to introduce this new prioritization > system without a > GUC to control the prioritization behavior. Since ordering by pg_class has > been > the only behavior ever since autovacuum was released, there should be a way > for users to revert back to this. The default could be the new > prioritization strategy. > > Introducing new GUCs is something to be avoided if possible, but I think this > case is a clear one to me.
As I sort of alluded to in my previous message, I'd rather see us introduce something that lets you get the behavior you want than something that just lets you get back to the old behavior. Technically, the latter is good enough to avoid any claim that we've regressed things: you can always just the new thing off, and so by definition there are no unavoidable regressions. But that only caters to the scenario where the current behavior is good by accident (because it can never be good for any other reason). Don't take this too literally, but just mooting ideas wildly, suppose the scoring has a wraparound component, a bloat component, and a reloption-driven component, and the former two have a weighting factor that can be adjusted via GUCs. If you want to shut off the new behavior, you can setting the weighting factors to 0. If you want to keep the new behavior but adjust the trade-off between the wraparound and bloat components, you can adjust the relative weighting factors between the two. If you want to take more manual control, you can use the reloption, a choice that you can layer on top of the default strategy or any of the alternate strategies just proposed. Of course, making this all too complicated is a recipe for failure, but I suspect that making it at least somewhat configurable is a good idea. -- Robert Haas EDB: http://www.enterprisedb.com
