Re: Regarding initdb & pg_ctl

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


 I tried out your suggestion, we are providing quotes correctly.
We tried out one thing we installed postgresql outside Program Files.
When I say installed I want to mean that I copied compiled binaries.
User installing is local user belonging to Administrators group. Then we
ran initdb utility with data directory to be in same directory (Outside
data directory)  . So initdb created it correctly. Then we tried to
register service using pg_ctl/register options. It worked too. Then we
tried to start service so here it failed.

      But when we tried to ran same scenario with runas /user:local_user
pg_ctl start -D <Data directory> on command prompt, postgres server
started without any problem. So I am confused as theoretically both
scenarios are same. Since service should be started by same user which
is provided later to start postgres through command line. All of these
problems are caused only on Windows 2003 Server Enterprise Edition with
windows XP everything is fine.

Can you provide some inputs on this?

Thanks & Regards,
Vikram

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

On Tue, Sep 15, 2009 at 03:55, Vikram Patil <vpatil@actuate.com> wrote:
> 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.

Certainly, that works fine.


> 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.

That's a pretty standard thing, it pretty much works.


> 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.

That should work. Another possibility is that it breaks because you
have spaces in the path name, and are not quoting it properly. The
quoting rules on Windows can be very strange :-)



> 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.

Can you see it opening postgres.exe? Or do you get a not foud error
somewhere?


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

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

Предыдущее
От: sulmansarwar
Дата:
Сообщение: Segmentation fault during restoration of compressed(.gz) database
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Segmentation Fault during database restoration