Skip to content

Instantly share code, notes, and snippets.

@dat-boris
Last active September 2, 2017 20:19
Show Gist options
  • Select an option

  • Save dat-boris/28d5975217c174b7c0c88fbf2fd5b4ab to your computer and use it in GitHub Desktop.

Select an option

Save dat-boris/28d5975217c174b7c0c88fbf2fd5b4ab to your computer and use it in GitHub Desktop.
Finding and releasing locks on Redshift
select * from
stv_locks
left join stv_recents on pid = lock_owner_pid;
-- http://docs.aws.amazon.com/redshift/latest/dg/PG_TERMINATE_BACKEND.html
select * from svv_transactions t
left join stv_recents r on r.pid = t.pid
order by txn_start;
-- Query for killing jobs:
-- cancel 29078;
-- Terminating entire process
-- https://stackoverflow.com/questions/18866865/difference-between-terminating-and-cancelling-a-process
-- select pg_terminate_backend(29078);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment