HiveBrain v1.2.0
Get Started
← Back to all entries
gotchasqlMinor

What is difference between session and connection in Postgres

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
whatpostgresdifferencebetweensessionandconnection

Problem

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.

Solution

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.

Context

StackExchange Database Administrators Q#318048, answer score: 3

Revisions (0)

No revisions yet.