Modify PostgreSQL max_connections

Source: Internet
Author: User

The default maximum number of connections in PostgreSQL is 200. If the number of connections exceeds 200, so many clients alreay will be reported. Of course, you can view the current maximum number of connections through show max_connections;

 

Modify the maximum number of connections. The most important thing is to modify the shmmax (maximum size of shared memory segment (bytes ))

Http://www.postgresql.org/docs/current/static/kernel-resources.html#SYSVIPC-PARAMETERS
Here are some explanations

What is the use of SHM, (shared memory segment)
Http://www.postgresql.org/docs/current/static/kernel-resources.html#SYSVIPC

Here is the description of Server start failed.
Http://www.postgresql.org/docs/current/static/server-start.html#SERVER-START-FAILURES

You can use sysctl to modify SHM in Linux (centos ).
1> sysctl-A: List all
Sysctl-A | grep shmmax
2> modify sysctl-W
Sysctl-W kernel. shmmax = 500000000 (Note that there cannot be spaces before and after the equal sign)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.