Created
January 23, 2014 20:58
-
-
Save nathanwdavis/8586650 to your computer and use it in GitHub Desktop.
What might be blocking my Postgres ALTER?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select distinct st.pid, | |
current_timestamp - st.query_start as locked_time, | |
st.state, | |
st.usename, | |
st.client_hostname, | |
st.application_name | |
from pg_locks l | |
inner join pg_stat_activity st on l.pid = st.pid | |
where st.datname = 'analytics_master' | |
order by current_timestamp - st.query_start desc; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment