Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been using Postgres and pgAdmin III for some years, but this morning I had a very BIG BIG problem. I'm using pgAdmin III 9.0 on Windows Xp operating system, on my laptop Dell Latitude E4300.

From this morning, Query Builder ("SQL Editor") option simply stopped working. When I open pgAdmin, everything is fine and workin', until I click on the Sql Query Builder button. When I do that, nothing appears and pgAdmin crashes without giving any information.

I tried to uninstall and install PgAdmin III 9.1, again, but Sql Query Builder kept not workin'.

What could I do?

share|improve this question
For clarification: @Daves confuses pgAdmin (the GUI, latest version 1.14.1) with PostgreSQL (the database management system, latest version 9.1). The problem is (was) with pgAdmin. – Erwin Brandstetter Feb 17 '12 at 18:36
Sorry my bad English. I am Brazilian. The setup worked. I'm using pgAdmin III 9.0 on Windows 7 operating system. I rename the files C:\Users\"myuser"\AppData\Roaming\postgresql C:\Users\Administrador\AppData\Roaming\postgresql to: C:\Users\"myuser"\AppData\Roaming\postgresql\pgadmin_histoqueries_old.xml C:\Users\Administrador\AppData\Roaming\postgresq\pgadmin_histoqueries_old.xml Thank you so much. – user25607 Jul 3 '13 at 13:53
up vote 10 down vote accepted

We had the same problem 2 times on two different computer, in just a few days of interval.

PgAdmin started to crash each time we open query builder.

Restarting the computer, reinstalling pgAdmin with differents versions... Nothing resolved the problem. But we found the solution to this problem!

PgAdmin uses a file where it saves the last queries (kind of history) and this file was probably corrupted (or one of the queries was).

This file is in the Application Data of your Windows User, that's why reinstalling pgAdmin doesn't work: this corrupted file is common for every postgres install.

So you just got to rename or delete the file pgadmin_histoqueries.xml located in your AppData (for us, D:\Documents and Settings\XXXXX\Application Data\postgresql) and relaunch pgAdmin, this should be OK.

share|improve this answer
You just save me from a lot of headache. I started a bounty to award some extra credit. – Erwin Brandstetter Feb 15 '12 at 17:51
I did the following and i solved the issue for me. Try the menu "View/Default View" so that if fixes each component's location. From… – Jorge Vidinha Sep 29 '15 at 17:51
Jorge - lifesaver, I had a non-drawing weirdly non-responsive query window, it started after I remote desktopped into my machine. It's normally a High DPI 4k display set at 150% scaling but over RDS was not. Clearly something got messed up, and View / Default View fixed it up nicely. – InsidiousForce Feb 11 at 17:25

protected by Community Jul 3 '13 at 14:54

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.