pgcli icon indicating copy to clipboard operation
pgcli copied to clipboard

Error running a query after connection was lost and restored

Open gantsevdenis opened this issue 5 years ago • 2 comments

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

gantsevdenis avatar Feb 12 '20 11:02 gantsevdenis

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?

dbaty avatar Nov 15 '23 22:11 dbaty

So, I can't reproduce the issue exactly, but we do have some odd behavior when the connection is lost and then restored.

Steps

  1. Run pgcli and connect to any remote database
  2. Turn off the wifi
  3. Run the \d command 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)
  1. Turn wifi back on
  2. Run \d again
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.

j-bennet avatar Nov 18 '23 06:11 j-bennet