STL tables are generated from logs that have been persisted to disk to provide a history of the system. STV tables are virtual tables that contain snapshots of the current system data. They are based on transient in-memory data and are not persisted to disk-based logs or regular tables. System views that contain any reference to a transient STV table are called SVV views. Views containing only references to STL tables are called SVL views.
To manage disk space, the STL log tables only retain approximately two to five days of log history, depending on log usage and available disk space.
To check the record of wlm aborted queries:
select * from stl_wlm_rule_action
Amazon Redshift locks tables to prevent two users from updating the same table at the same time.
To Check locks record:
select table_id, last_update, lock_owner, lock_owner_pid from stv_locks;
Find and Cancel long running query in Redshift?
select pid, trim(user_name), starttime, substring(query,1,20)
Take the pid from result
for example: cancel 11516;