sql - Find the users pointing to my database postgresql -
i logged psql console delete databases, gives me error:
error: database "production" being accessed other users detail: there 1 other session using database.
how should find users pointing database?
you can use pg_stat_activity view. show pretty of interest every open session, such user (usename), s/he connecting (client_addr , client_hostname), state (active, idle, etc) , last query (being) executed.
Comments
Post a Comment