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