Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Redshift DROP TABLE never stops executing

I tried attempted to execute all of the following and the query was still running after over 400 seconds in all cases causing me to have to alt+f4 the navicat program using the created admin account whom is a super user.

DROP TABLE IF EXISTS test.<table> CASCADE;
DROP TABLE IF EXISTS test.<table>;
DROP TABLE test.<table>;

https://docs.aws.amazon.com/redshift/latest/dg/r_DROP_TABLE.html says that is proper syntax, what should I be looking at on my cluster to figure out why these queries never execute and just go on forever. I am passing schema because there is a production table in the database with the same name and I cannot delete it, this table exists within the test schema. Is schema inclusion the problem?

like image 338
Shenanigator Avatar asked Oct 28 '25 11:10

Shenanigator


1 Answers

The article AWSQuickSolutions: Redshift Table Can’t Be Dropped or Drop Table Hangs helped me find an answer; I didn't realize there was a pendning backend lock on the table. Found the lock and removed the pending query.

like image 125
Shenanigator Avatar answered Oct 30 '25 15:10

Shenanigator