I figured this out, too. But it might be nice to offer, during a reconnect, to use the saved password (as well as allowing a new one to be typed in). That would at least avoid people thinking that the save password was lost.
On Thu, Jul 5, 2012 at 1:57 AM, Dave Page <dp...@pgadmin.org> wrote: > That's exactly why it does it. > > On Thursday, July 5, 2012, Michael Shapiro wrote: > >> I ran into this and the behavior actually make some sense -- PgAdmin >> can't know why the connection was rejected so it has to deal with the >> possibility that the stored might be wrong. One idea is for PgAdmin to give >> an option of either reconnecting using the stored password or to enter a >> new one. >> >> >> >> On Wed, Jul 4, 2012 at 8:13 PM, Rohan Carly <ro...@digins.net.au> wrote: >> >>> On 5/07/2012 3:57 AM, Guillaume Lelarge wrote: >>> >>>> On Tue, 2012-07-03 at 14:50 +0800, Rohan Carly wrote: >>>> >>>>> On 17/02/2012 6:33 AM, Guillaume Lelarge wrote: >>>>> >>>>>> On Wed, 2012-02-15 at 05:16 -0600, Michael Shapiro wrote: >>>>>> >>>>>>> I have taken to making a copy of the password file so that when the >>>>>>> connection fails and PgAdmin removes the password, I can put it back. >>>>>>> >>>>>>> I think I've found your issue. Here is the way to trigger it: >>>>>> >>>>>> 1. Start PostgreSQL >>>>>> 2. Start pgAdmin >>>>>> 3. Connect to your server without typing a password (thanks to >>>>>> .pgpass) >>>>>> 4. Disconnect from your server >>>>>> 5. Stop PostgreSQL (not pgAdmin) >>>>>> 6. Connect to your server >>>>>> --> error because PostgreSQL is not started >>>>>> 7. Start PostgreSQL >>>>>> 8. Connect to your server >>>>>> --> pgAdmin asks for your password >>>>>> if you click OK here without typing your password, then >>>>>> pgAdmin >>>>>> records an empty password in the .pgpass file >>>>>> >>>>>> The fix I pushed a few minutes ago doesn't allow pgAdmin to record an >>>>>> empty password. >>>>>> >>>>>> I suppose it'll fix your issue. If you can test the current code >>>>>> (master >>>>>> or REL-1_14_0_PATCHES), that would be great. >>>>>> >>>>>> >>>>>> I frequently hit this bug also, using pgAdmin III v.1.14.1 on >>>>> Windows. >>>>> >>>>> It is not as complex as step 8 above suggests. Even if you press >>>>> [Cancel], >>>>> pgAdmin still forgets your password. Perhaps the solution would be to >>>>> display >>>>> the password prompt in this scenario, but prepopulate it with the >>>>> previous >>>>> password? Then I could just press OK and continue working. >>>>> >>>>> I note that the passwords in >>>>> C:\Users\rohan\AppData\**Roaming\postgresql\pgpass.conf are in plain >>>>> text. >>>>> >>>>> From reading this thread, and some experimentation, I discovered >>>>> that pgAdmin >>>>> does not actually delete my password from the pgpass.conf file, even >>>>> though it >>>>> appears that way from the frontend. Therefore my quickest workaround >>>>> is to >>>>> completely close out of pgAdmin, open it again, and double-click on >>>>> the saved >>>>> connection. Provided I have fixed the connection problem (stopped >>>>> server etc) >>>>> it does not re-prompt for my password. It would still be preferable to >>>>> have >>>>> this fixed though. >>>>> >>>>> Have you tried 1.14.3? does it still happen? >>>> >>>> Yes, the problem is still present in 1.14.3, I just tried it this >>> morning. As soon as I get the "server doesn't listen" dialog box, I not >>> that I will not be able to connect again without either supplying a >>> password, or restarting pgAdmin. >>> >>> >> > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > >