Andres Freund <and...@anarazel.de> writes: > How about trying the higher setting first in initdb? On any sane system that > won't cost anything because it'll succeed with the higher value.
That might be a good compromise. You'd have to think about how it should interact with initdb's probes for workable values of max_connections. My first thought about that is to have initdb set autovacuum_worker_slots to max_connections / 8 or thereabouts as it works down the list of max_connections values to try. Or you could do something more complicated, but I don't see a reason to make it too complex. regards, tom lane