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.
-
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.jjanes– jjanes2022年10月10日 20:13:45 +00:00Commented Oct 10, 2022 at 20:13
-
threshold for db.m4.4xlarge postgress is 16 sessions in awsuser1844634– user18446342022年10月10日 20:19:16 +00:00Commented Oct 10, 2022 at 20:19
-
1I don't know what 'threshold' means here, but max_connections defaults to 5000 for that machine size with RDS.jjanes– jjanes2022年10月10日 20:57:12 +00:00Commented 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 reduser1844634– user18446342022年10月10日 20:59:41 +00:00Commented Oct 10, 2022 at 20:59
-
2There 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.jjanes– jjanes2022年10月11日 14:23:47 +00:00Commented Oct 11, 2022 at 14:23
3 Answers 3
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.
"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.
Sessions start after connections are pulled from the pool and end before they go back into the pool.