Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Script to find active sessions or connections in PostgreSQL

In this post, I am sharing a psql script to find a running or active sessions and connections of PostgreSQL.

This script is handy for PostgreSQL DBA.
I am using this same script for our productions PostgreSQL server.

Below is a script:
I filtered “idle connections”
FROM pg_stat_activity
WHERE state <> 'idle'
AND pid<>pg_backend_pid();


Popular posts from this blog

How to find the server is whether standby (slave) or primary(master) in Postgresql replication ?

PostgreSQL pgBadger

How to Return a Result Set from a PostgreSQL Stored Procedure

How to Get Table Size, Database Size, Indexes Size, schema Size, Tablespace Size, column Size in PostgreSQL Database

vacuumlo - removing large objects orphans from a database PostgreSQL