"Sriram Dandapani" <sdandapani@xxxxxxxxxxxxxxx> writes: > I tried your code with the lock table followed by drop. > The lock table goes into a wait state AND all INSERTS (even new ones > coming in) go into a wait state. Well, it's waiting for something. Try looking in pg_locks to see which transaction is blocking it. regards, tom lane