Subject: RM#1387 [Add-on PATCH] Bad handling of missing connection database server

From: Ashesh Vashi <[email-masked]>
Date: Tue, 30 Aug 2016 19:16:44 +0530

Hi Dave,

Please find the add-on patch on top of the current change.

Can you please take a look at it?
This mainly works on the postgres driver to make an attempt to reconnect
the server.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com>

*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>

-- 
Sent via pgadmin-hackers mailing list ([email-masked])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

---

From: Ashesh Vashi <[email-masked]>
Date: Tue, 30 Aug 2016 21:35:22 +0530

On Tue, Aug 30, 2016 at 7:16 PM, Ashesh Vashi <[email-masked]
> wrote:

> This mainly works on the postgres driver to make an attempt to reconnect

One more attempt with some more corner cases handling.
* Handled the connection-lost, and object gone error on client side during
'refresh' operation.
* Handle the reconnection more consistently (even during cursor object
creation).

Please take a look at it.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com/>

---

From: Dave Page <[email-masked]>
Date: Fri, 2 Sep 2016 15:19:03 +0100

Akshay, can you review/commit this please?

Thanks.

On Tue, Aug 30, 2016 at 5:05 PM, Ashesh Vashi <[email-masked]

> On Tue, Aug 30, 2016 at 7:16 PM, Ashesh Vashi <
> [email-masked]> wrote:
>
>> Hi Dave,
>>

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

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

---

From: Akshay Joshi <[email-masked]>
Date: Tue, 6 Sep 2016 12:05:36 +0530

> Akshay, can you review/commit this please?

    Sure.

>
> Thanks.
>
> On Tue, Aug 30, 2016 at 5:05 PM, Ashesh Vashi <
>> * Handled the connection-lost, and object gone error on client side
>> during 'refresh' operation.

-- 
*Akshay Joshi*
*Principal Software Engineer *

*Phone: +91 20-3058-9517Mobile: +91 976-788-8246*

---

From: Akshay Joshi <[email-masked]>
Date: Tue, 6 Sep 2016 18:35:57 +0530

Code looks good to me. Patch applied.

On Tue, Sep 6, 2016 at 12:05 PM, Akshay Joshi <[email-masked]

>>>> This mainly works on the postgres driver to make an attempt to
>>>> reconnect the server.
>>>>
>>>

---

From: Surinder Kumar <[email-masked]>
Date: Wed, 7 Sep 2016 17:08:07 +0530

Hi

while closing query tool, the following error is display on python console.

  File
"/Users/surinder/Documents/Projects/pgadmin4/web/pgadmin/tools/datagrid/__init__.py",
line 270, in close
    manager.release(did=cmd_obj.did, conn_id=cmd_obj.conn_id)
  File
"/Users/surinder/Documents/Projects/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py",
line 1501, in release
    self.connections[my_id]._release()
  File
"/Users/surinder/Documents/Projects/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py",
line 1002, in _release
    if self.wasConneted:
AttributeError: 'Connection' object has no attribute 'wasConneted'

*Issue:*
This issue is due to typo. Please find attached patch.

On Tue, Sep 6, 2016 at 6:35 PM, Akshay Joshi <[email-masked]>
wrote:

> On Tue, Sep 6, 2016 at 12:05 PM, Akshay Joshi <
> [email-masked]> wrote:
>
>>
>>

---

From: Dave Page <[email-masked]>
Date: Wed, 7 Sep 2016 14:02:04 +0100

Thanks - applied.

On Wed, Sep 7, 2016 at 12:38 PM, Surinder Kumar <
[email-masked]> wrote:

>   File "/Users/surinder/Documents/Projects/pgadmin4/web/pgadmin/tools/datagrid/__init__.py",
> line 270, in close
>   File "/Users/surinder/Documents/Projects/pgadmin4/web/pgadmin/
> utils/driver/psycopg2/__init__.py", line 1501, in release
>   File "/Users/surinder/Documents/Projects/pgadmin4/web/pgadmin/
> utils/driver/psycopg2/__init__.py", line 1002, in _release
>     if self.wasConneted:
> On Tue, Sep 6, 2016 at 6:35 PM, Akshay Joshi <
>>> *Phone: +91 20-3058-9517 <%2B91%2020-3058-9517>Mobile: +91 976-788-8246*
>>>
>>
>>
>>
>> --
>> *Akshay Joshi*
>> *Phone: +91 20-3058-9517 <%2B91%2020-3058-9517>Mobile: +91 976-788-8246*
>>
>
>