max_connections
One of the settings that you'll always find set to a value, typically 100, in the postgresql.conf generated by initdb is max_connections. As each connection uses a small amount of shared memory, as described in the previous chapter, Chapter 5, Memory for Database Caching, it's possible for systems with particularly limited shared-memory defaults to not even allow these many connections. Accordingly, like shared_buffers, some investigation is done when the database cluster is created, and then the largest value supported up to 100 is saved into the default configuration. In practice, the amount of non-shared memory each client uses for things like sorting will dwarf this, but the shared component can't be completely ignored. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access