Hima Surapaneni <hbsur1(at)student(dot)monash(dot)edu> writes:
> The query was successful. But when I try to drop or alter the table, it just hangs without echoing any error message. I have to cancel the query to get out.
Sounds like there's some open transaction with a lock on the table.
The pg_locks view might help you figure out which one.
regards, tom lane