Thread: pgadmin and broken connections

pgadmin and broken connections

From
Josh Berkus
Date:
All,

I'm not sure if anyone uses pgadmin over as many VPNs as I do, and has
noticed this.

On OSX, at least, pgadmin can't deal with broken database connections at
all.  If my connection was over a VPN, and the VPN, and I log back in,
there is no way to get pgadmin to reconnect to that database except by
shutting down pgadmin completely and restarting it.

Is this an issue which is common to all platforms?  Or an OSX-specific
issue?

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


Re: pgadmin and broken connections

From
Josh Berkus
Date:
On 6/29/11 1:10 PM, Josh Berkus wrote:
> all.  If my connection was over a VPN, and the VPN, and I log back in,

"... and the VPN kicks me off ... "


-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


Re: pgadmin and broken connections

From
Guillaume Lelarge
Date:
On Wed, 2011-06-29 at 13:10 -0700, Josh Berkus wrote:
> All,
> 
> I'm not sure if anyone uses pgadmin over as many VPNs as I do, and has
> noticed this.
> 
> On OSX, at least, pgadmin can't deal with broken database connections at
> all.  If my connection was over a VPN, and the VPN, and I log back in,
> there is no way to get pgadmin to reconnect to that database except by
> shutting down pgadmin completely and restarting it.
> 
> Is this an issue which is common to all platforms?  Or an OSX-specific
> issue?
> 

We had some previous reports about this. The issue is that I can't
reproduce it (mainly because I don't have a PostgreSQL server on a VPN
connection).


-- 
Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com



Re: pgadmin and broken connections

From
Dave Page
Date:
On Thu, Jun 30, 2011 at 9:12 AM, Guillaume Lelarge
<guillaume@lelarge.info> wrote:
> On Wed, 2011-06-29 at 13:10 -0700, Josh Berkus wrote:
>> All,
>>
>> I'm not sure if anyone uses pgadmin over as many VPNs as I do, and has
>> noticed this.
>>
>> On OSX, at least, pgadmin can't deal with broken database connections at
>> all.  If my connection was over a VPN, and the VPN, and I log back in,
>> there is no way to get pgadmin to reconnect to that database except by
>> shutting down pgadmin completely and restarting it.
>>
>> Is this an issue which is common to all platforms?  Or an OSX-specific
>> issue?
>>
>
> We had some previous reports about this. The issue is that I can't
> reproduce it (mainly because I don't have a PostgreSQL server on a VPN
> connection).

Also there seems to be some confusion over the versions of pgAdmin
affected. 1.14 has improvements over 1.12 - which are you using Josh?


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

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


Re: pgadmin and broken connections

From
Michael Shapiro
Date:
I run a VPN. I did not see this problem with PgAdmin (1.14).<br />I connected to the VPN, then I started PgAdmin and
rana query. <br />Then I disconnected the VPN and ran the query again. No problem.<br />Then I reconnected the VPN and
ranthe query once again. No problem.<br /><br />I also tested it started PgAdmin first, then starting the VPN. <br />No
combinationof connects/disconnects produced any problem with PgAdmin.<br /><br />I am running Windows 7<br /><br /><div
class="gmail_quote">OnThu, Jun 30, 2011 at 3:12 AM, Guillaume Lelarge <span dir="ltr"><<a
href="mailto:guillaume@lelarge.info">guillaume@lelarge.info</a>></span>wrote:<br /><blockquote class="gmail_quote"
style="margin:00 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">On Wed, 2011-06-29 at 13:10 -0700, Josh Berkus
wrote:<br/> > All,<br /> ><br /> > I'm not sure if anyone uses pgadmin over as many VPNs as I do, and has<br
/>> noticed this.<br /> ><br /> > On OSX, at least, pgadmin can't deal with broken database connections at<br
/>> all.  If my connection was over a VPN, and the VPN, and I log back in,<br /> > there is no way to get pgadmin
toreconnect to that database except by<br /> > shutting down pgadmin completely and restarting it.<br /> ><br />
>Is this an issue which is common to all platforms?  Or an OSX-specific<br /> > issue?<br /> ><br /><br /> We
hadsome previous reports about this. The issue is that I can't<br /> reproduce it (mainly because I don't have a
PostgreSQLserver on a VPN<br /> connection).<br /><br /><br /> --<br /> Guillaume<br />  <a
href="http://blog.guillaume.lelarge.info"target="_blank">http://blog.guillaume.lelarge.info</a><br />  <a
href="http://www.dalibo.com"target="_blank">http://www.dalibo.com</a><br /><font color="#888888"><br /><br /> --<br />
Sentvia pgadmin-support mailing list (<a
href="mailto:pgadmin-support@postgresql.org">pgadmin-support@postgresql.org</a>)<br/> To make changes to your
subscription:<br/><a href="http://www.postgresql.org/mailpref/pgadmin-support"
target="_blank">http://www.postgresql.org/mailpref/pgadmin-support</a><br/></font></blockquote></div><br /> 

Re: pgadmin and broken connections

From
Josh Berkus
Date:
> Also there seems to be some confusion over the versions of pgAdmin
> affected. 1.14 has improvements over 1.12 - which are you using Josh?

1.12.  Let me try upgrading, and I'll report back.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


Re: pgadmin and broken connections

From
Josh Berkus
Date:
On 6/30/11 9:49 AM, Josh Berkus wrote:
> 
>> Also there seems to be some confusion over the versions of pgAdmin
>> affected. 1.14 has improvements over 1.12 - which are you using Josh?
> 
> 1.12.  Let me try upgrading, and I'll report back.

Well, I can't tell you because I can't seem to use 1.14b1 for more than
an hour without it crashing.  Actually, in the last 90 minutes it's
crashed 4 times.  Once when I tried to change the preferences, but the
rest of the time it just crashed while I was trying to edit queries.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


Re: pgadmin and broken connections

From
Dave Page
Date:
On Thu, Jun 30, 2011 at 7:31 PM, Josh Berkus <josh@agliodbs.com> wrote:
> On 6/30/11 9:49 AM, Josh Berkus wrote:
>>
>>> Also there seems to be some confusion over the versions of pgAdmin
>>> affected. 1.14 has improvements over 1.12 - which are you using Josh?
>>
>> 1.12.  Let me try upgrading, and I'll report back.
>
> Well, I can't tell you because I can't seem to use 1.14b1 for more than
> an hour without it crashing.  Actually, in the last 90 minutes it's
> crashed 4 times.  Once when I tried to change the preferences, but the
> rest of the time it just crashed while I was trying to edit queries.

Let me guess - when opening a bracket or brace and hitting return? If
so, that's fixed in beta 2 (which apparently we forgot to list on the
website. Ooops):

http://www.postgresql.org/ftp/pgadmin3/release/v1.14.0-beta2/


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

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


Re: pgadmin and broken connections

From
Christophe Chauvet
Date:
Hi Guillaume

I have this issue but not only with VPN. You can reproduce by using
SSH with -L argument as

ssh -L 2000:127.0.0.1:5432 myuser@my_ip

launch PgAdmin with localhost avec IP and port 2000

execute a query, go to you terminal, press Ctrl + C to cut the
connection and retry the previous command ssh -L ....

and refresh the connexion on PgAdmin, it crash

Regards,



2011/6/30 Guillaume Lelarge <guillaume@lelarge.info>:
> On Wed, 2011-06-29 at 13:10 -0700, Josh Berkus wrote:
>> All,
>>
>> I'm not sure if anyone uses pgadmin over as many VPNs as I do, and has
>> noticed this.
>>
>> On OSX, at least, pgadmin can't deal with broken database connections at
>> all.  If my connection was over a VPN, and the VPN, and I log back in,
>> there is no way to get pgadmin to reconnect to that database except by
>> shutting down pgadmin completely and restarting it.
>>
>> Is this an issue which is common to all platforms?  Or an OSX-specific
>> issue?
>>
>
> We had some previous reports about this. The issue is that I can't
> reproduce it (mainly because I don't have a PostgreSQL server on a VPN
> connection).
>
>
> --
> Guillaume
>  http://blog.guillaume.lelarge.info
>  http://www.dalibo.com
>
>
> --
> Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-support
>



--
Cordialement.

Christophe Chauvet.
--
http://blog.kryskool.org/
Membre de PostgreSQLFr


Re: pgadmin and broken connections

From
Guillaume Lelarge
Date:
On Fri, 2011-07-01 at 13:50 +0200, Christophe Chauvet wrote:
> Hi Guillaume
> 
> I have this issue but not only with VPN. You can reproduce by using
> SSH with -L argument as
> 
> ssh -L 2000:127.0.0.1:5432 myuser@my_ip
> 
> launch PgAdmin with localhost avec IP and port 2000
> 
> execute a query, go to you terminal, press Ctrl + C to cut the
> connection and retry the previous command ssh -L ....
> 
> and refresh the connexion on PgAdmin, it crash
> 

Tried that. The query tool have no issues with this (it detects the lost
connection, and resets it). The browser behaves in a weird way, which
needs to get fixed, but doesn't crash. At least, for me.


-- 
Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com



Re: pgadmin and broken connections

From
Josh Berkus
Date:
Dave, Guillaume,

I've tested 1.14b2 on OSX 10.5 and reconnecting now works perfectly.  It
even worked after I put the laptop to sleep and changed networks and
then reconnected the VPN.

Yaaaay!

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


Re: pgadmin and broken connections

From
Josh Berkus
Date:
On 7/11/11 12:09 PM, Josh Berkus wrote:
> Dave, Guillaume,
> 
> I've tested 1.14b2 on OSX 10.5 and reconnecting now works perfectly.  It
> even worked after I put the laptop to sleep and changed networks and
> then reconnected the VPN.

Booo.   I spoke too soon.  While reconnecting the query window works
perfectly, reconnecting the object navigator does not.  I just get
"refreshing server ______ ... failed".

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


Re: pgadmin and broken connections

From
Dave Page
Date:
On Mon, Jul 11, 2011 at 10:18 PM, Josh Berkus <josh@agliodbs.com> wrote:
> On 7/11/11 12:09 PM, Josh Berkus wrote:
>> Dave, Guillaume,
>>
>> I've tested 1.14b2 on OSX 10.5 and reconnecting now works perfectly.  It
>> even worked after I put the laptop to sleep and changed networks and
>> then reconnected the VPN.
>
> Booo.   I spoke too soon.  While reconnecting the query window works
> perfectly, reconnecting the object navigator does not.  I just get
> "refreshing server ______ ... failed".

I'm unable to recreate that :-(

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

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


Re: pgadmin and broken connections

From
Josh Berkus
Date:
>> Booo.   I spoke too soon.  While reconnecting the query window works
>> perfectly, reconnecting the object navigator does not.  I just get
>> "refreshing server ______ ... failed".
> 
> I'm unable to recreate that :-(

Well, it's happening pretty consistently here:

1) create an SSH tunnel to a PG server
2) Connect to pg server and open several query windows
3) close SSH tunnel
4) reopen ssh tunnel
5) try to access object browser
6) get "refreshing ... failed", or crash

I think I can reproduce the above pattern 100% of the time.  Note that
pgadmin stays up until I make the mistake of clicking on the object browser.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


Re: pgadmin and broken connections

From
Dave Page
Date:
On Tue, Jul 12, 2011 at 5:45 PM, Josh Berkus <josh@agliodbs.com> wrote:
>
>>> Booo.   I spoke too soon.  While reconnecting the query window works
>>> perfectly, reconnecting the object navigator does not.  I just get
>>> "refreshing server ______ ... failed".
>>
>> I'm unable to recreate that :-(
>
> Well, it's happening pretty consistently here:
>
> 1) create an SSH tunnel to a PG server
> 2) Connect to pg server and open several query windows
> 3) close SSH tunnel
> 4) reopen ssh tunnel
> 5) try to access object browser
> 6) get "refreshing ... failed", or crash
>
> I think I can reproduce the above pattern 100% of the time.  Note that
> pgadmin stays up until I make the mistake of clicking on the object browser.

For the benefit of the list, I just re-wrote much of the code that
handles this, and posted a proposed patch to the hackers list:
http://archives.postgresql.org/pgadmin-hackers/2011-07/msg00267.php


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

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


Re: pgadmin and broken connections

From
Josh Berkus
Date:
Dave,

>> I think I can reproduce the above pattern 100% of the time.  Note that
>> pgadmin stays up until I make the mistake of clicking on the object browser.
> 
> For the benefit of the list, I just re-wrote much of the code that
> handles this, and posted a proposed patch to the hackers list:
> http://archives.postgresql.org/pgadmin-hackers/2011-07/msg00267.php

OK, I don't have the kit to compile this on OSX, so I'll test it once
you have a downloadable package.

FWIW, I'd be OK with waiting until 1.15 to fix this.  You need to get
1.14 out sometime ...

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com