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. ...

Get PostgreSQL 10 High Performance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.