Re: initdb failed on Windows 2000 - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: initdb failed on Windows 2000
Date
Msg-id 20070830081445.GF14845@svr2.hagander.net
Whole thread Raw
In response to Re: initdb failed on Windows 2000  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: initdb failed on Windows 2000  (Yoshiyuki Asaba <y-asaba@sraoss.co.jp>)
List pgsql-hackers
On Wed, Aug 29, 2007 at 08:57:55AM -0400, Andrew Dunstan wrote:
> 
> 
> Yoshiyuki Asaba wrote:
> >  
> >>I have compiled PostgreSQL 8.2.4 with MinGW on Windows 2000. Then I
> >>have executed initdb as Administrator. However initdb failed with the
> >>following message.
> >>
> >>----
> >>The program "postgres" is needed by initdb but was not found in the
> >>same directory as "C:\msys\1.0\local\pgsql\bin/initdb".
> >>Check your installation.
> >>----
> >>
> >>So, I have debugged initdb.exe. I found that CreatePipe() was failed
> >>with ERROR_ACCESS_DENIED in exec.c:pipe_read_line().
> >>    
> >
> >The attached files are test programs.
> >
> >  % gcc -o child.exe child.c
> >  % gcc -o parent.exe parent.c
> >
> >When parent.exe is executed by Power Users or Users, the result is
> >good. However, CreatePipe() is failed when Administrator do.
> >
> >  % ./parent.exe
> >  CreatePipe() failed: 5
> >
> >  
> >
> 
> What do you want us to do about it? Isn't this a case of "don't do that, 
> then"? Run initdb as some other user. We don't let you run initdb as 
> root on Unix, so we're just being consistent. In fact, we're being more 
> liberal on Windows than on Unix because we make some provision for the 
> restricted token gadget.

FWIW, I regularly run initdb as administrator, and it works perfectly fine.
So what you need to do is to try to figure out *why* CreatePipe() fails.
Process Monitor or a debugger might help.

//Magnus


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Some more msvc++ 8.2.4 build feedback
Next
From: Hans-Juergen Schoenig
Date:
Subject: Re: correct behavior of ANALYZE ...