Re: [pgadmin-support] Reconnection problem.

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
Cc: PgAdmin Support <pgadmin-support(at)postgresql(dot)org>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>, Piotr Czekalski <pczekalski(at)techbaza(dot)pl>
Subject: Re: [pgadmin-support] Reconnection problem.
Date: 2011-05-03 10:17:13
Message-ID: BANLkTinV0-Yd+dAKPzrVROEtvj0TUFJn9Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers pgadmin-support

On Tue, May 3, 2011 at 11:15 AM, Guillaume Lelarge
<guillaume(at)lelarge(dot)info> wrote:
> On 05/03/2011 11:09 AM, Dave Page wrote:
>> On Mon, May 2, 2011 at 10:37 PM, Guillaume Lelarge
>> <guillaume(at)lelarge(dot)info> wrote:
>>> On 05/02/2011 10:09 PM, Guillaume Lelarge wrote:
>>>> On 05/02/2011 10:20 AM, Dave Page wrote:
>>>>> On Sun, May 1, 2011 at 4:32 PM, Guillaume Lelarge
>>>>> <guillaume(at)lelarge(dot)info> wrote:
>>>>>> Hi,
>>>>>>
>>>>>> On 04/26/2011 12:46 PM, Piotr Czekalski wrote:
>>>>>>> [...]
>>>>>>> I'd would appreciate such feature, because working over GSM modem, which
>>>>>>> is common to the administrators novadays (I think) is a nightmare ;-).
>>>>>>>
>>>>>>
>>>>>> Got a patch that works. See the attachment. If the query fails, it
>>>>>> checks if it's because of a bad connection. If connection is bad, it
>>>>>> resets it, and executes once again the query. If it still fails, you
>>>>>> have the usual error message. If it succeeds, you won't even notice that
>>>>>> it had to reset the connection.
>>>>>>
>>>>>> I don't see any issue with this patch, but would like others to get a
>>>>>> look. It's wxThread and that kind of stuff is not really my thing
>>>>>> (threading... eeks).
>>>>>>
>>>>>> And one more question, we're really early in beta stage. Usually, it
>>>>>> would have to wait a few months to get commited in next dev cycle. But
>>>>>> it is so early in this stage (actually, beta 1 is not even announced
>>>>>> yet), and it would be a so much welcomed patch that I think it could be
>>>>>> commited for this release (ie, 1.14).
>>>>>>
>>>>>> Any opinions, objections, ideas?
>>>>>
>>>>> You cannot just reconnect silently in a patch like this - the user may
>>>>> have created temp tables or otherwise modified the connection-specific
>>>>> environment before the connection was lost. Blindly reconnecting and
>>>>> then executing the query could have disastrous effects.
>>>>>
>>>>
>>>> Indeed, you're right. I knew I forgot something important with this patch :)
>>>>
>>>> Too bad, because I really liked the silent reconnection. Well, I suppose
>>>> I'll have to change this to make it verbose.
>>>>
>>>
>>> Something more like this, then?
>>
>> That doesn't look entirely objectionable :-p
>>
>> Couple of wording tweaks though - first, why not reuse the existing
>> reconnection messages:
>>
>> wxMessageDialog dlg(this, _("Do you want to attempt to reconnect to
>> the database?"),
>>         wxString::Format(_("Connection to database %s lost."),
>> db->GetName().c_str()),
>>         wxICON_EXCLAMATION | wxYES_NO | wxYES_DEFAULT);
>>
>> Second:
>>
>> "Connection resetted." -> "Connection reset."
>>
>
> OK, will do.
>
> And about the fact that we're already past beta 1?

I'd call it a bug. There is no sane way to re-establish that connection.

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

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

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2011-05-03 19:20:06 pgAdmin III commit: Fix a bunch of warnings on VC++
Previous Message Guillaume Lelarge 2011-05-03 10:15:56 Re: [pgadmin-support] Reconnection problem.

Browse pgadmin-support by date

  From Date Subject
Next Message Evan Zeimet 2011-05-03 14:19:02 Re: pgAdmin 1.2.2 on W7 - Editor won't open
Previous Message Guillaume Lelarge 2011-05-03 10:15:56 Re: [pgadmin-support] Reconnection problem.