Terminate (kill) specific session in Vertica database

PostgreSQL provides function to terminate specific session on a server.

Find session ID

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 v_monitor.sessions;

Result

Result shows active sessions on server.

sample results

Kill session

Now we will use session id to kill the session:


select close_session('session_id')

Result

Vertica ends session and rolls back all transactions that are associated with it and closes the socket. sample results

0
There are no comments. Click here to write the first comment.