[pgsql-general] cant find postgres executable after initdb

From: "Willy-Bas Loos" <willybas(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: [pgsql-general] cant find postgres executable after initdb
Date: 2008-11-05 13:36:49
Message-ID: 1dd6057e0811050536p5d03fdd1vd0d2c400999ea105@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I have a pgsql 8.3.3 cluster running on windows.
I want to install another cluster, so i use initdb.
Because the postgres user must own the files, i use runas to run initdb as
postgres2 (the correct user here).
I've created a separate folder for the data files of this cluster. The
folder is owned by the admin user, but posgres2 has full control of it (ok,
maybe i should squeeze that down a little strictly speaking)
As far as i can see, that is the preferred way to create a cluster in ms
windows. Is that correct?

The resulting cluster does not start with pg_ctl. The postgres executable is
in the bin folder, just like pg_ctl.
The other cluster is running.

##====in the cmd window:=====
C:\Program Files\PostgreSQL\8.3\bin>runas /user:mydomain\postgres2 "initdb
-D \"C:\Program Files\PostgreSQL\8.3\data_5433\" --no-locale"
Enter the password for mydomain\postgres2:
Attempting to start initdb -D "C:\Program Files\PostgreSQL\8.3\data_5433"
--no-locale as user "mydomain\postgres2" ...
## remark from me: starts a new window in which it does initdb. window
closes after execution :(

C:\Program Files\PostgreSQL\8.3\bin>pg_ctl start -D "C:\Program
Files\PostgreSQL\8.3\data_5433"
server starting
FATAL: postgres: could not locate matching postgres executable

C:\Program Files\PostgreSQL\8.3\bin>pg_ctl start -D "C:\Program
Files\PostgreSQL\8.3\data_5433" -p "C:\Program
Files\PostgreSQL\8.3\bin\postgres.exe"
server starting
C:\Program Files\PostgreSQL\8.3\bin>FATAL: postgres: could not locate
matching postgres executable

C:\Program Files\PostgreSQL\8.3\bin>pg_ctl start -D "C:\Program
Files\PostgreSQL\8.3\data_5433" -o "-p \"C:\Program
Files\PostgreSQL\8.3\bin\""
server starting
FATAL: ongeldige waarde voor parameter "port": "C:\Program
Files\PostgreSQL\8.3\bin"

C:\Program Files\PostgreSQL\8.3\bin>pg_ctl status -D "C:\Program
Files\PostgreSQL\8.3\data" ## <-- the other cluster
pg_ctl: server is running (PID: 2056)
##=====================

Cheers,
WBL
--
"Patriotism is the conviction that your country is superior to all others
because you were born in it." -- George Bernard Shaw

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2008-11-05 14:01:02 Re: Equivalent for AUTOINCREMENT?
Previous Message Mauricio Reyes 2008-11-05 13:30:44 Re: PGDAY2008 (PostgreSQL)