How to fix PGAdmin freezing in Linux
October 22, 2012
For the past few months, I was unable to use PGAdmin for anything other than viewing tables. Anytime I opened the SQL pane, right clicked a table, or numerous other things, the window would freeze and I would have to shut down the program. I tried reinstalling it, lots of googling, but couldn’t get the problem to go away. Thus, I became very skilled at postgres using the terminal editor, which is really powerful and easier than PGAdmin in many ways. Still, I wanted to use the GUI for various tasks and was unhappy that I couldn’t fix the problem.
Luckily, my coworker John Caldas encountered the same issue, and was able to solve it. By trial and error, he realized you could delete a postgres history file and solve the problem.
`cd` to your home directory and issue this command:
Boom! Problem solved. We think that occasionally a race condition can result when you close the SQL pane in PGAdmin while it has some sort of error, and the history keeps it from reopening. This works in Ubuntu and I would assume other distributions, try grepping for the histoqueries file if it isn’t in your home directory. Enjoy!