Redshift provides function to terminate specific session on a server.
Find session ID (process)
First we will identify the session we want to end. We do it by listing all sessions on the server with this query:
select * from stv_sessions;
Result shows active sessions on server.
Now we will use process ID (process) to kill the session (323 in our example):
Redshift ends session and rolls back all transactions that are associated with it.