Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PgAdmin sometimes crash when clicking SQL query button

I know this question may be seen as a duplicate with this one. I even have almost the same configuration (PostgreSQL 9.1.3, pgAdmin III 1.14.3, 32 bit Windows). What is the difference and the reason I ask a new question is that my PgAdmin doesn't crash always (just mostly) and that the cause of the problem is different - in linked question the problem was with missing adminpack, but I have adminpack installed and it works well, so the answer for linked question doesn't work for me.

Do you have any ideas where the problem could be?

EDIT: PgAdmin doesn't crash at other occasions (well, unless I do someting that obviously deserves a crash), just while trying to open SQL query window. It's worse and worse as time goes on, now it's almost "always". The problem is not "connection specific" - frequence of crashing is the same for different server connections.

EDIT2: I reinstalled PgAdmin and nothing have changed. I'm starting to suspect PostgreSQL 9.1.3 or even PostGIS 2.0.1 of the problem.

like image 395
Pavel V. Avatar asked Dec 13 '12 18:12

Pavel V.


People also ask

How do I run a SQL query in pgAdmin?

You can access the Query Tool via the Query Tool menu option on the Tools menu, or through the context menu of select nodes of the Browser tree control. The Query Tool allows you to: Issue ad-hoc SQL queries. Execute arbitrary SQL commands.

What is scratch pad in pgAdmin?

The upper panel displays the SQL Editor. You can use the panel to enter, edit, or execute a query. It also shows the History tab which can be used to view the queries that have been executed in the session, and a Scratch Pad which can be used to hold text snippets during editing.

What SQL does pgAdmin use?

pgAdmin is the most popular and feature rich Open Source administration and development platform for PostgreSQL, the most advanced Open Source database in the world. pgAdmin may be used on Linux, Unix, macOS and Windows to manage PostgreSQL and EDB Advanced Server 10 and above.

Is SQL a pgAdmin?

pgadmin is a general purpose tool for designing, maintaining, and administering Postgres databases. It runs under Windows 95/98 and NT. Features include: Arbitrary SQL entry.


2 Answers

PgAdmin crashes on me all of the time, but you eventually learn to be gentle with it.

Particularly, if it is waiting for a response from the PostgreSQL server, the window may freeze up until a reply is returned and parsed. When this happens, do not close the window, just wait.

Also, if you attempt to edit two different objects on the same parent, save one and click save on the other, this crashes the program.

My advice would be to only do one thing at a time, be patient, and don't be in a hurry to kill the process when it freezes up.

like image 37
Joshua Burns Avatar answered Sep 22 '22 10:09

Joshua Burns


  1. Goto run and type %appdata% and go inside postgresql folder.
  2. rename or delete pgadmin_histoqueries.xml file.
  3. try opening the SQL query editor again.

Good luck!

like image 125
Ashwath Avatar answered Sep 25 '22 10:09

Ashwath