BUG #5065: pg_ctl start fails as administrator, with "could not locate matching postgres executable"

Поиск
Список
Период
Сортировка
От Jesse Morris
Тема BUG #5065: pg_ctl start fails as administrator, with "could not locate matching postgres executable"
Дата
Msg-id 200909190231.n8J2Vniq012823@wwwmaster.postgresql.org
обсуждение исходный текст
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      5065
Logged by:          Jesse Morris
Email address:      jmorris@coverity.com
PostgreSQL version: 8.3.7, 8.4.1
Operating system:   Windows Server 2003 R2
Description:        pg_ctl start fails as administrator, with "could not
locate matching postgres executable"
Details:

I am logged in as domain\jmorris, a member of the local Administrators
group.

I am not running postgres as a service.

I can reproduce this with the zip file from enterprisedb for 8.3.7, or
8.4.1.   I also used msys/mingw to build my own (to instrument debugging
output) and that reproduces it as well.

From cmd.exe:
initdb.exe works fine.
pg_ctl start complains "FATAL: postgres - could not locate matching postgres
executable"

Instrumentation and investigation reveals that the failure is in
find_other_exec (exec.c) as the error text implies, but ultimately in
pipe_read_line; CreatePipe fails with error 5 (Access Denied).

HOWEVER!
If I run pg_ctl from cygwin (or a cmd process that has cygwin or cygstart or
anything cygwinish as a parent) it works as expected.

Almost certainly related:  AddUserToDacl (also in exec.c) has comments
explaining that what it does is necessary because otherwise on newer windows
we'll see access denied on CreatePipe.  However AddUserToDacl appears to be
working as written; none of the error paths are visited anyway.

I can reproduce this on a number of separate win2k3 R2 SP2 boxes, including
one VM that is basically a fresh OS install.

So:  Two bugs:

* pg_ctl's manages to shoot itself in the foot when relinquishing
administrator rights (unless there's cygwin?)

* the error-reporting for this is extremely misleading.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: pwright
Дата:
Сообщение: Re: BUG #5062: 8.4.1 compile fails on debian can't find libdl
Следующее
От: "Tim Bunce"
Дата:
Сообщение: BUG #5066: plperl issues with perl_destruct() and END blocks