Postgresql DROP TABLE doesn't work

前端 未结 7 1243
别跟我提以往
别跟我提以往 2020-12-08 02:43

I\'m trying to drop a few tables with the \"DROP TABLE\" command but for a unknown reason, the program just \"sits\" and doesn\'t delete the table that I want i

7条回答
  •  再見小時候
    2020-12-08 02:50

    So I was hitting my head against the wall for some hours trying to solve the same issue, and here is the solution that worked for me:

    Check if PostgreSQL has a pending prepared transaction that's never been committed or rolled back:

    SELECT database, gid FROM pg_prepared_xacts;
    

    If you get a result, then for each transaction gid you must execute a ROLLBACK from the database having the problem:

    ROLLBACK PREPARED 'the_gid';
    

    For further information, click here.

提交回复
热议问题