Closing user sessions in Vertica
I'm trying to set up a cronjob for closing user sessions in vertica. I'm using following query to close the sessions.
SELECT * FROM sessions s
WHERE s.login_timestamp <= timestampadd(hour, -3, sysdate)
AND s.current_statement = ''
I run close_session for the session ids fetched from above.
I want to ensure that I dont delete any internal session. I see that in vertica documentation, client_hostname or user_name will be NULL for internal sessions but I do see some system related queries which have NON NULL values for client_hostname or user_name in SESSIONS table. I'm little confused over here. Could someone please explain why these internal sessions (mostly SELECT queries) have non-NULL values in these columns?