Thread: pgAdmin4 - Connection Lost

pgAdmin4 - Connection Lost

From
Jack Royal-Gordon
Date:
Hi Folks,

I often leave query windows open in pgAdmin4, even when I close my laptop and put it to sleep. It usually loses the
connectionto the server when this happens. If I then open the laptop and re-run the last query (or run any other
query),it takes 30 seconds to a minute before the query aborts with the message “Connection to server lost!”. Anything
youcould do to either restore the connection automatically or give the message quicker would be appreciated (note that
thisis already an improvement over pgAdmin III, where if I respond “Yes” to the “Restore connection?” question, the
entireprogram aborts. 

Thanks,

Jack


Re: pgAdmin4 - Connection Lost

From
Dave Page
Date:
Hi

On Friday, October 28, 2016, Jack Royal-Gordon <jackrg@pobox.com> wrote:
Hi Folks,

I often leave query windows open in pgAdmin4, even when I close my laptop and put it to sleep. It usually loses the connection to the server when this happens. If I then open the laptop and re-run the last query (or run any other query), it takes 30 seconds to a minute before the query aborts with the message “Connection to server lost!”. Anything you could do to either restore the connection automatically or give the message quicker would be appreciated (note that this is already an improvement over pgAdmin III, where if I respond “Yes” to the “Restore connection?” question, the entire program aborts.

I suspect the timeout is libpq realising that the connection has been lost. I doubt there's anything we can do about that.

Regarding the message - displaying that is intentional. You really, really, really want to know that the connection is being re-established if you were in the middle of a transaction, or had run some other queries (like SET search_path) before it was lost.

Regards, Dave. 


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company