Why not to use 'pg_ctl start -D ../data' to register posgtresql windows service

From: YuanyuanLiu <liuyuanyuangogo(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Why not to use 'pg_ctl start -D ../data' to register posgtresql windows service
Date: 2015-11-02 05:54:58
Message-ID: 1446443698232-5872282.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi, Hackers!

Nowadays, I always got problem about postgresql windows service.
I find, postgresql usually use the following command to register windows
services:
/"D:\Program Files (x86)\PostgreSQL\9.4\bin\pg_ctl.exe" runservice -N
"postgresql-9.4" -D "D:\Program Files (x86)\PostgreSQL\9.4\data" -w/
But this command always failed, beacause of user privilege, just as a
topic described:

http://postgresql.nabble.com/pg-ctl-could-not-start-service-quot-pgsql-8-2-quot-error-code-1063-td1880801.html#a1880802
While 'pg_ctl start -D ../data' works well, why not to use this command to
register postgresql windows service? why to use 'pg_ctl runservice -N "psql"
-D ".../data"' ? This is really confused me when I use postgresql in
windows.

Hope to hear from you!
Regards!

Liu Yuanyuan

--
View this message in context: http://postgresql.nabble.com/Why-not-to-use-pg-ctl-start-D-data-to-register-posgtresql-windows-service-tp5872282.html
Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Janes 2015-11-02 05:58:41 Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby
Previous Message Michael Paquier 2015-11-02 05:53:14 Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby