Initial server tuning can be turned into a fairly mechanical process:
- Adjust the logging default to be more verbose.
- Determine how large to set shared_buffers to. Start at 25% of system memory. Consider adjusting upward if you're on a recent PostgreSQL version with spread checkpoints and know your workload benefits from giving memory directory to the buffer cache. If you're on a platform where this parameter is not so useful, limit its value or adjust downward accordingly.
- Estimate your maximum connections generously, as this is a hard limit; clients will be refused connection once it's reached (without a pool manager).
- Start the server with these initial parameters. Note how much memory is still available for ...