detect locks on redshift
SELECT current_time, c.relname, l.database, l.transaction, l.pid, a.usename, l.mode, l.grantedFROM pg_locks l JOIN pg_catalog.pg_class c ON c.oid = l.relationJOIN pg_catalog.pg_stat_activity a ON a.procpid = l.pidWHERE l.pid <> pg_backend_pid();