How to Increase max_connections in Postgres Safely
To increase max_connections in Postgres, run ALTER SYSTEM SET max_connections = N; (or edit postgresql.conf) and restart the server — a reload alone won't apply it, because max_connections is a postmaster-context parameter read once at startup. That's the easy part. The part that bites you three days later is sizing that number against real RAM, …