I am running postgresql 9.6 in my windows 7 laptop. Nobody else connects to the database. I ran an insert SQL in Query Tool of Pgadmin4. The query got over after 20 minutes or so. The records got inserted & the state in pg_stat_activity went from active to idle which I checked by opening the other query tool window. But the original window in which the query was run continued to be frozen with message
"waiting for the query execution to complete"
How can I fix this problem. I did some research. Does it have something to do with TCP/IP connection getting broken as mentioned in below links
Link 1
and
Link 2 (under Connection to database dropped)
Go to Dashboard in your pgAdmin. At the bottom, in the Server Activity section, under the Sessions Tab, you can see all the Active queries. Now, notice the cross button and the Stop button to the left of each query.
To close a copy of the Query tool, click the X in the upper-right hand corner of the tab bar. The Query Tool features two panels: The upper panel displays the SQL Editor.
The File Menu¶ Click to open the Preferences dialog to customize your pgAdmin settings. If you have modified the workspace, click to restore the default layout.
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.
Restart pgadmin and try the query again.
as of 2018 pgadmin seems to handle connection timeouts really badly, so you will often need to restart the entire pgadmin appliction after a period of not using it, and then go through the process of expanding the tree again to get right down to the table you were working with.
It does make me wonder whether the authors of pgadmin actually eat their own dogfood, as it's quite painful to use day-to-day compared to say SQL Server's Management Studio.
Not exactly a solution but got a work around. The problem was that after query execution it was running the autovacuum and then even after it got over, pgadmin was staying frozen. I disabled autovacuum in the config file and it started working fine. Not sure if this will have any impact on performance or anything else. Will see.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With