The following bug has been logged online: Bug reference: 5065 Logged by: Jesse Morris Email address: jmor...@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. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs