Re: Re: [BUGS] BUG #5650: Postgres service showing as stopped when in fact it is running
От | Bruce Momjian |
---|---|
Тема | Re: Re: [BUGS] BUG #5650: Postgres service showing as stopped when in fact it is running |
Дата | |
Msg-id | 201011120249.oAC2niD01755@momjian.us обсуждение исходный текст |
Ответ на | Re: [BUGS] BUG #5650: Postgres service showing as stopped when in fact it is running (Magnus Hagander <magnus@hagander.net>) |
Ответы |
Re: Re: [BUGS] BUG #5650: Postgres service showing as
stopped when in fact it is running
|
Список | pgsql-hackers |
Magnus Hagander wrote: > On Fri, Sep 17, 2010 at 05:51, Ashesh Vashi > <ashesh.vashi@enterprisedb.com> wrote: > > Hi Mark, > > > > On of my college (Sujeet) has found a way to reproduce the same behaviour. > > 1. Installed PG 9.0 on Win XP SP3 > > 2. Stop the Postgresql-9.0 service from service manager console > > 3. Create pgpass.conf in postgres (service account) user's profile with an > > incorrect password deliberately. > > (Refer: http://www.postgresql.org/docs/8.4/interactive/libpq-pgpass.html) > > 4. Now start the postgresql-9.0 service, it will return an error and the > > status > > ?? shows stopped > > 5. However i could connect to the psql shell and get the prompt which means > > ??? the server is running. > > I took a quick look at the code, and from what I can tell this is > because PQconnectionNeedsPassword() always returns false if a > pgpass.conf has been used. There is no handling the case where pgpass > is used, but has an incorrect password. > > Does anybody recall the specific reason for this? Do we need a way for > pg_ctl to figure this out, or do we need to change it in > PQconnecitonNeedsPassword()? I was not able to reproduce this failure on my BSD system using GIT head: $ psql testpsql: FATAL: password authentication failed for user "postgres"password retrieved from file "/u/postgres/.pgpass" $ pg_ctl statuspg_ctl: server is running (PID: 710)/usr/var/local/pgsql/bin/postgres "-i" -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +
В списке pgsql-hackers по дате отправления: