Type: | integer |
Default: | 100 |
Min: | 1 |
Max: | 262143 |
Context: | postmaster |
Restart: | true |
Determines the maximum number of concurrent connections to the database server. The default is typically 100 connections, but might be less if your kernel settings will not support it (as determined during initdb). This parameter can only be set at server start.
When running a standby server, you must set this parameter to the same or higher value than on the primary server. Otherwise, queries will not be allowed in the standby server.
Recommendations
Should be set to the maximum number of connections which you expect to need at peak load. Note that each connection uses shared_buffer memory, as well as additional non-shared memory, so be careful not to run the system out of memory. In general, if you need more than 200 connections, you should probably be making more use of connection pooling.
On StackOverflow
On pgsql-hackers
- Re: Slow standby snapshot
- Re: 15beta1 test failure on mips in isolation/expected/stats
- Re: How about a psql backslash command to show GUCs?
- Re: [PATCH] fix wait_event of pg_stat_activity in case of high amount of connections
- [PATCH] fix wait_event of pg_stat_activity in case of high amount of connections