Re: Regarding initdb & pg_ctl

Поиск
Список
Период
Сортировка
От Vikram Patil
Тема Re: Regarding initdb & pg_ctl
Дата
Msg-id 71F491F5DA99604A80DE49424BF3D02B0CED54DF@exchange8.actuate.com
обсуждение исходный текст
Ответ на Re: Regarding initdb & pg_ctl  (Magnus Hagander <magnus@hagander.net>)
Ответы Re: Regarding initdb & pg_ctl  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-general
Thanks Magnus for help.

Is there any way to start pg_ctl without creating postgres user? I am trying to use same logged in user to run initdb
andstart service. As per documentation it seems to be allowed after 8.3. We tried to use it the way I describe on
WindowsXP and it worked without any problem.  

Our installer first copies compiled binaries and then try to run initdb as current user. If it worked then we register
servicewith same user and password. Users are defined in Active directory on active directory server ,basically we are
usingdomain\user format to log in and run installation. 
Once registration is finished, we need to start service.

I tried to run initdb with data directory path outside Program Files .It works fine But when data directory path is
locatedinside program files, initdb fails. 

As per your advice I tried process monitor, it shows that there are no failures. So we can assume it is a issue with
permissions.

Thanks & Regards

Vikram

-----Original Message-----
From: Magnus Hagander [mailto:magnus@hagander.net]
Sent: Monday, September 14, 2009 4:28 AM
To: Vikram Patil
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Regarding initdb & pg_ctl

On Sat, Sep 12, 2009 at 05:23, Vikram Patil <vpatil@actuate.com> wrote:
> Hello Folks,
>
>
>
>        So I have following problem as I logged in Windows 2003 with
> domain\user. I am basically trying to create installer for postgres. So I
> need to keep in mind that  person who is going to install can be the one who
> is currently logged in.
>
>
>
> So I tried to change permissions on data directory so that initdb will run
> fine. I changed creator owner privileges to be read and execute using XACLS
> then ran initdb. It populated directory correctly  But when I used pg_ctl to
> start up service it failed saying
>
> "FATAL:  XX000: C:/Program Files/PostgreSQL/8.4/bin/postgres.exe: could not
> locate matching postgres executable
>
> , .\src\backend\postmaster\postmaster.c:1070 ..."
>
>
>
> Please provide some inputs how to tackle with this permission issues. Thanks
> in advance

When you run pg_ctl, it will drop any privileges that is acquired
through administrator groups. Did you grant the permissions directly
to the postgres user account, and not through something that chains up
to Administrators or Domain Admins? Also, make sure this holds true
for the whole path up there.

If you did, then the next step is to run Process Monitor
(http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx) during
the startup and see exactly which operation it is that fails. It is
probably trying to load a DLL somewhere it doesn't have permissions.

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

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

Предыдущее
От: "Johnson, Trevor"
Дата:
Сообщение: PostgreSQL on Windows Server 2003 for Moodle
Следующее
От: "Gauthier, Dave"
Дата:
Сообщение: Re: syntax troubles using "deferrable initially deferred"