Last active
November 5, 2024 02:21
-
-
Save skeptrunedev/b1f09cbed0a2766953fde6b5a532e8c3 to your computer and use it in GitHub Desktop.
postgres-migration-status-and-kill.sql
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
-- the output of this command will have a table with a pid colummn | |
-- find the migration you want to stop and copy it's pid for step 2 | |
SELECT * | |
FROM pg_stat_activity | |
WHERE state = 'active'; | |
-- use the pid you copied from the previous output here instead of 7844 | |
SELECT pg_cancel_backend(7844); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment