PostgreSQL Terminate Active Connections

This post shows how to terminate active connections in PostgreSQL using some SQL commands.

Tested On

PostgreSQL 10.5

Terminate active connections

procid refers to the pid field from the pg_stat_activity table.

We can also terminate active connections belonging to a particular user. For example,

You Might Also Like