1

What does postgresql documentation mean for max_connections - "Defines the maximum number of concurrent connections to the database server"? This refers to the number of users, for example: 1. I have 1 database and 2 servers that pull it "1 database 2 users". or 2. I have 1 database, 1 server and 100 connected clients "1 database 1 user 100 connections". Which of these options is correct and if the first option, how many times in default postgresql can support connected clients?

1 Answer 1

2

max_connections does not depend on the number of client servers you use to connect to the database, and shouldn't necessarily be thought of in terms of users. If max_connections is 100, it means that you can have 100 open connections at once. These connections can be spread across any number of clients. So you may have 50 connections per client and 2 clients, or 10 connections per client and 10 clients.

Both your statements are technically correct if you're using "user" to refer to a client.

PS - Check out connection pools if you're going to have multiple clients.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.