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 shows active sessions on server.

sample results

Kill session

Now we will use session id to kill the session:

select close_session('session_id')


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

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