I am trying to drop an empty table
drop table temp; the query is running forever.
So, I tried to find other queries that could block the current query. Here is what I tried:
SELECT *
FROM pg_locks l
JOIN pg_class t ON l.relation = t.oid AND t.relkind = 'r'
WHERE t.relname = 'temp';
This query returns with zero results
SELECT database, gid FROM pg_prepared_xacts;
This does not give any result as well.
The table is a partitioned table, the partitions attached to the table has been deleted successfully already.
I am not even able to get result for \d temp.
What has happened? How can I get this fixed?
This does not happen when I tried the same in local. Works perfectly fine.