pgcli
pgcli copied to clipboard
Error running a query after connection was lost and restored
Description
wakapi_depl1> \d category
Reconnecting...
Reconnect Failed
could not translate host name "proxyprod" to address: Name or service not known
<.. turning on work VPN ... >
wakapi_depl1> \d category
'NoneType' object has no attribute 'mogrify'
Your environment
Version: 2.1.1 Linux: 4.15.0-62-generic
This is a very old issue. If you're still around, could you please try to reproduce with the latest version of pgcli? Also, what output do you expect? Is "category" a table in your database?
So, I can't reproduce the issue exactly, but we do have some odd behavior when the connection is lost and then restored.
Steps
- Run pgcli and connect to any remote database
- Turn off the wifi
- Run the
\dcommand and wait for it to time out
> pgcli -D quality
Server: PostgreSQL 12.16
Version: 4.0.0
Home: http://pgcli.com
master@dquality:quality> \d
consuming input failed: Operation timed out
SSL SYSCALL error: Operation timed out
Time: 18.321s (18 seconds), executed in: 18.321s (18 seconds)
- Turn wifi back on
- Run
\dagain
master@dquality:quality> \d
sending query failed: another command is already in progress
Time: 0.002s
master@dquality:quality>
That doesn't look right, even though the error is different. We should handle this error.