Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bhcUm-0001Hf-Ll for pgadmin-hackers@arkaria.postgresql.org; Wed, 07 Sep 2016 13:02:28 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bhcUm-0007JV-8H for pgadmin-hackers@arkaria.postgresql.org; Wed, 07 Sep 2016 13:02:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bhcUY-0006yi-1d for pgadmin-hackers@postgresql.org; Wed, 07 Sep 2016 13:02:14 +0000 Received: from mail-it0-x231.google.com ([2607:f8b0:4001:c0b::231]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bhcUS-0000TQ-8Y for pgadmin-hackers@postgresql.org; Wed, 07 Sep 2016 13:02:13 +0000 Received: by mail-it0-x231.google.com with SMTP id e124so30129728ith.0 for ; Wed, 07 Sep 2016 06:02:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=jha3i5mBouyij5DI5rbdlKCpjlBJZKkUVwkx2aLdnRY=; b=fZmoh3GRnOAJ6f3jJjJS1fQq9P3LN/vNDjy2JGz+59te2GeDK+H6Qth3RUhtx+AmX1 m0zJQ4lIKsZjLpSQshDwUYQbDX4DhwMRcSXc/8J9CFK8AXU5gM2TXO9GMmEINDPZAe1d k96Yjxs2D58C4F7cOoESnApo8BibDgoJ0+0NhQcQCJa00JPmX2UgNrdijOgtHvRhA5ZM +TLx5pnCxv3n9l2WdpJpYl6qz3NM34wLh4iZnTaI9qu4cN2Br3AVZL9j5eOFBeCXT6Q1 nQ0vSeS3SoBrLO2LqXWqlEgBwNooelvw425gYI8z0wK4Hyxp9d0w21dEvAe67+b30Hdz p7Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=jha3i5mBouyij5DI5rbdlKCpjlBJZKkUVwkx2aLdnRY=; b=ZaJyxKJhDd5S/d5sfdpwKvpfghd2KBmxutsjhAp3gKduP+H3jnjLTfn7saykII3sqG ea4XOx7tcr1bJ53HGYCcbzSJ5x7G+pbgjrgDOEAMEAmTzzVgWsQOLbJbcG7oRJ7o8am/ 30LNZc83gGvBLz3ll1h3HBnvMXCNv2dpAAoa/PMcwNfz34Z2m4w/swrH3SRHv4jRLqk/ HaYECdqF79xK4jE/QQEdWIkwObYkKZHxTWPaQdyVBb8aKHKaWWx7kG3q5ecyn52yr6GW 2ik10qnCfgcajRyiWyQT33XZhw81O5pkKcZtSbyBfoPvkMLwmtJXtxOM5JkQ03a19JKE cv6Q== X-Gm-Message-State: AE9vXwPihY63ULutIKF5JaJoaSIn2zPbHsOn0CN55Ji3L2eo/2JNc30yPpPRiwF7LE1jA6XUaIGnc6tvptHm1g== X-Received: by 10.36.51.206 with SMTP id k197mr6352566itk.37.1473253325611; Wed, 07 Sep 2016 06:02:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.1.203 with HTTP; Wed, 7 Sep 2016 06:02:04 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Wed, 7 Sep 2016 14:02:04 +0100 Message-ID: Subject: Re: Re: RM#1387 [Add-on PATCH] Bad handling of missing connection database server To: Surinder Kumar Cc: Akshay Joshi , Ashesh Vashi , pgadmin-hackers Content-Type: multipart/alternative; boundary=001a1144dfd027429a053bea859e X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org --001a1144dfd027429a053bea859e Content-Type: text/plain; charset=UTF-8 Thanks - applied. On Wed, Sep 7, 2016 at 12:38 PM, Surinder Kumar < surinder.kumar@enterprisedb.com> wrote: > 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 < > akshay.joshi@enterprisedb.com> wrote: > >> Code looks good to me. Patch applied. >> >> On Tue, Sep 6, 2016 at 12:05 PM, Akshay Joshi < >> akshay.joshi@enterprisedb.com> wrote: >> >>> >>> >>> On Fri, Sep 2, 2016 at 7:49 PM, Dave Page wrote: >>> >>>> Akshay, can you review/commit this please? >>>> >>> >>> Sure. >>> >>>> >>>> Thanks. >>>> >>>> On Tue, Aug 30, 2016 at 5:05 PM, Ashesh Vashi < >>>> ashesh.vashi@enterprisedb.com> wrote: >>>> >>>>> On Tue, Aug 30, 2016 at 7:16 PM, Ashesh Vashi < >>>>> ashesh.vashi@enterprisedb.com> wrote: >>>>> >>>>>> 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. >>>>>> >>>>> >>>>> 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.linkedin.com/in/asheshvashi* >>>>> >>>>> >>>>>> >>>>>> -- >>>>>> >>>>>> Thanks & Regards, >>>>>> >>>>>> Ashesh Vashi >>>>>> EnterpriseDB INDIA: Enterprise PostgreSQL Company >>>>>> >>>>>> >>>>>> >>>>>> *http://www.linkedin.com/in/asheshvashi* >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>>> -- >>>> Dave Page >>>> Blog: http://pgsnake.blogspot.com >>>> Twitter: @pgsnake >>>> >>>> EnterpriseDB UK: http://www.enterprisedb.com >>>> The Enterprise PostgreSQL Company >>>> >>> >>> >>> >>> -- >>> *Akshay Joshi* >>> *Principal Software Engineer * >>> >>> >>> >>> *Phone: +91 20-3058-9517 <%2B91%2020-3058-9517>Mobile: +91 976-788-8246* >>> >> >> >> >> -- >> *Akshay Joshi* >> *Principal Software Engineer * >> >> >> >> *Phone: +91 20-3058-9517 <%2B91%2020-3058-9517>Mobile: +91 976-788-8246* >> > > -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company --001a1144dfd027429a053bea859e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks - applied.

On Wed, Sep 7, 2016 at 12:38 PM, Surinder Kumar <surinder.kumar@enterprisedb.com> wrote:
Hi

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

=C2=A0 File "/Users/surinder/Documents/Projects/pgadmin4/web= /pgadmin/tools/datagrid/__init__.py", line 270, in close
=C2=A0 =C2=A0 manager.release(did=3Dcmd_obj.= did, conn_id=3Dcmd_obj.conn_id)
=C2=A0 Fi= le "/Users/surinder/Documents/Projects/pgadmin4/web/pgadmin/= utils/driver/psycopg2/__init__.py", line 1501, in release
=C2=A0 =C2=A0 self.connections[my_id]._rele= ase()
=C2=A0 File "/Users/surinder/D= ocuments/Projects/pgadmin4/web/pgadmin/utils/driver/psycopg2/__in= it__.py", line 1002, in _release
=C2=A0 =C2=A0 if self.wasConneted:
Attr= ibuteError: 'Connection' object has no attribute 'wasConneted&#= 39;

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

On Tue, Sep 6, 2016 at 6:35 PM, Akshay Joshi <akshay.joshi@e= nterprisedb.com> wrote:
Code looks good to me. Patch applied.=C2=A0

On Tue, Sep 6,= 2016 at 12:05 PM, Akshay Joshi <akshay.joshi@enterprisedb.com= > wrote:


On = Fri, Sep 2, 2016 at 7:49 PM, Dave Page <dpage@pgadmin.org> w= rote:
Akshay, can you re= view/commit this please?=C2=A0

=C2=A0 =C2=A0 Sure.=C2=A0

Thanks.

On Tue, Aug 30, 2016 at 5:05= PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com><= /span> wrote:
On Tue, Aug 30, 2016 at 7:16 PM, Ashesh Vashi <ashesh.vashi@e= nterprisedb.com> wrote:
Hi Dave,

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

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

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

Please take a look at it.

--

<= span style=3D"font-family:"courier new",monospace">Thanks & Regards,

Ashe= sh Vashi
EnterpriseDB INDIA:=C2=A0Enterprise PostgreSQL Company


http://www.linkedin.com/in/asheshvashi<= /span>





<= font color=3D"#888888">--
Dave = Page
Blog: htt= p://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: <= a href=3D"http://www.enterprisedb.com" target=3D"_blank">http://www.enterpr= isedb.com
The Enterprise PostgreSQL Company



--
Aks= hay Joshi
Principal Software Engineer=C2=A0
<= div>

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



--
<= b>Akshay Joshi
Principal Software Enginee= r=C2=A0

=

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




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

EnterpriseDB UK: http://www.enterprised= b.com
The Enterprise PostgreSQL Company
--001a1144dfd027429a053bea859e--