7

I use Postgres in Aws of db.m4.4xlarge instance which has threshold of 16 sessions. Does that mean Postgres only accepts 16 concurrent connections? Is my understanding correct? How can db.m4.4xlarge machine can accept only 16 connections? What exactly difference between session/connection are both are synonyms to each other.

asked Oct 10, 2022 at 19:22
5
  • 1
    "How can db.m4.4xlarge machine can accept only 16 connections?" Because that is how you, or someone, configured it. Surely that is not the maximum possible configuration. Commented Oct 10, 2022 at 20:13
  • threshold for db.m4.4xlarge postgress is 16 sessions in aws Commented Oct 10, 2022 at 20:19
  • 1
    I don't know what 'threshold' means here, but max_connections defaults to 5000 for that machine size with RDS. Commented Oct 10, 2022 at 20:57
  • I am taking about the current activity sessions in aws rds. beyonds 16 sessions the bar in the rds performance insights turning red Commented Oct 10, 2022 at 20:59
  • 2
    There usually isn't much advantage to having more active sessions than you have CPUs, but allowing it can make bookkeeping simpler. In any event, the color scheme chosen by Performance Insights surely doesn't disallow connections. Commented Oct 11, 2022 at 14:23

3 Answers 3

5

Database Connection: When client connect the server but not authenticated yet. A client backend (postgres sub process) starts in server.

Database Session: When client completes the authentication progress. Now the client can execute sql.

A database connection limit is database session limit. Without a connection client cannot have session and a connection have only one session in postgresql. So they are used as synonyms.

answered Oct 11, 2022 at 9:55
2

"Database session" and "database connection" are usually used as synonyms. I don't know about Amazon's services, and you didn't provide a link.

answered Oct 11, 2022 at 8:40
-1

Sessions start after connections are pulled from the pool and end before they go back into the pool.

answered Mar 13 at 16:20

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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.