My local Postgres server is configured to start when the computer starts. I just changed postgresql.conf
file and had to restart the server. I did:
pg_ctl restart
from the command line BUT that started the server on the next command prompt:
pg_ctl: old server process (PID: 2968) seems to be gone starting server anyway server starting D:\>2016-10-12 16:24:48 EDT LOG: redirecting log output to logging collector proces 2016-10-12 16:24:48 EDT HINT: Future log output will appear in directory "pg_log".
If I ctrl-c
out of it or close the command window, that closes the server. How can I use pg_ctl
to (re)start the server in the background, emulating how it works by default (as a Windows service)?
net stop
andnet start
to stop and start it. Notpg_ctl
services.msc
typically it'spostgresql-9.5
(or whatever version you are using)