問題:
Is there a command in PostgreSQL to select active connections to a given database? PostgreSQL 中是否有一個命令可以選擇到給定數據庫的活動連接?
psql
states that I can't drop one of my databases because there are active connections to it , so I would like to see what the connections are (and from which machines) psql
聲明我不能刪除我的數據庫之一,因爲有活動連接到它,所以我想看看連接是什麼(以及來自哪些機器)
解決方案:
參考一: https://stackoom.com/question/1r7JX參考二: How to list active connections on PostgreSQL?