Home Postgres table queries not responding
Reply: 1

Postgres table queries not responding

Naveen Yadav
Naveen Yadav Published in 2018-02-14 09:01:48Z

I have been trying to truncate a table using SQlWorkbench. Suddenly, SqlWorkbench got freezed, while the truncate was in progress. I had to kill workbench from taskmanager. But now none of the queries are working on the table on which the truncate was aborted abruptly. For other tables queries are working fine. Need help, as I have to upload fresh data on the same table. Currently I am not even able to drop the table. What can be done to resolve this issue?

Laurenz Albe
Laurenz Albe Reply to 2018-02-14 09:14:10Z

This looks like the TRUNCATE got stuck behind a lock, and then you killed the front end, while TRUNCATE kept running.

Connect to the database as superuser and examine the pg_stat_activity view; you should see some long running transactions.

Use the function pg_terminate_backend to kill these sessions by their pid.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.301841 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO