Hi, Michael! Thanks for your reply! I knew that postgresql windows service is made by "pg_ctl register -N serviceName -D dataPath". And command from service, like "D:\Program Files (x86)\PostgreSQL\9.4\bin\pg_ctl.exe" runservice -N "postgres-9.4" -D "D:\Program Files (x86)\PostgreSQL\9.4\data", cannot run manually like command line.
I have a conclusion: When we registered postgresql windows service named "postgres-9.4", we can start the postgresql server by manually starting the windows service , runing command "net stop postgres-9.4" (need user with administrator privilege), or runing command "pg_ctl start -D ../path/to/data". The started postgresql service must be stopped in the same session. Is this right ? Looking forward to your reply! Regard! 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-tp5872282p5872294.html Sent from the PostgreSQL - hackers mailing list archive at Nabble.com. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers