HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Is it possible to refresh PgAdmin 4 query without restarting a new query after disconnect?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
pgadminafterwithoutnewqueryrefreshpossiblerestartingdisconnect

Problem

Sometimes I leave a PgAdmin session alone for a while and when I come back to issue a query, I get an error

Server closed the connection unexpectedly. 
        This probably means the server terminated abnormally
        before or while processing the request.
******* Error **********


So, I know I just need to reconnect but it seems like I have to close the query window and reconnect and open a new query window for things to work.

Is it possible to reconnect and use the same query window?

It has been suggested that I click the execute button again after the error comes, and PgAdmin will reconnect the instance and execute the query. However, that does not work. PgAdmin is not reconnecting no matter how many times I try to re-execute.

Solution

If the connection you created has password saved in it, then just click the execute button again after the error comes. PgAdmin will reconnect the instance and execute the query. I am using pgAdmin 4.1.5 and that works for me. – Lohit Gupta

With newer versions, you just have to right click on server and select refresh, it should automatically re-connect to server if the password is saved – Murtuza Z

Context

StackExchange Database Administrators Q#187946, answer score: 4

Revisions (0)

No revisions yet.