From: | "Vikram Patil" <vpatil(at)actuate(dot)com> |
---|---|
To: | "Magnus Hagander" <magnus(at)hagander(dot)net> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Regarding initdb & pg_ctl |
Date: | 2009-09-15 01:55:26 |
Message-ID: | 71F491F5DA99604A80DE49424BF3D02B0CED54DF@exchange8.actuate.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 and start service. As per documentation it seems to be allowed after 8.3. We tried to use it the way I describe on Windows XP 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 service with same user and password. Users are defined in Active directory on active directory server ,basically we are using domain\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 located inside 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(at)hagander(dot)net]
Sent: Monday, September 14, 2009 4:28 AM
To: Vikram Patil
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Regarding initdb & pg_ctl
On Sat, Sep 12, 2009 at 05:23, Vikram Patil <vpatil(at)actuate(dot)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/
From | Date | Subject | |
---|---|---|---|
Next Message | Gauthier, Dave | 2009-09-15 02:29:20 | Re: syntax troubles using "deferrable initially deferred" |
Previous Message | Johnson, Trevor | 2009-09-15 00:43:45 | PostgreSQL on Windows Server 2003 for Moodle |