PostgreSQL Error: database is being accessed by other users

In this article, we will the solution for PostgreSQL Error: database is being accessed by other users
Detail: There are 2 other sessions using the database

ERROR  database  is being accessed by other users
Continue reading PostgreSQL Error: database is being accessed by other users

How to find list of active sessions/connections in PostgreSQL database

In this article, we will see how to find list of active sessions/connections in PostgreSQL database.

We can find list of active/inactive sessions/connections by querying against PostgreSQL system view pg_stat_activity.
Continue reading How to find list of active sessions/connections in PostgreSQL database

How to get list of sessions on PostgreSQL database

In this article, we will see how to get list of sessions on PostgreSQL database. We will see all sessions in PostgreSQL and sessions specific to the database. We can get session by running queries against pg_stat_activity.

Syntax to get list of sessions on PostgreSQL database: Continue reading How to get list of sessions on PostgreSQL database