postgresql: (Auto)tune DB pool sizes based on max_connections
Created by: keegancsmith
We have had Sourcegraph.com and customer issues due to opening too many connections to postgresql. We should consider to either:
- Autotune our db pool sizes. We can query max_connections.
- Autotune max_connections (probably can't due to different sized envs)
- Adjust DB pool size to be much more conservative.
Customers: