I have a local postgresql database for development purposes that I dont want to start up every time Windows does - how do I stop it from starting!
I have a local postgresql database for development purposes that I dont want to start up every time Windows does - how do I stop it from starting!
If it is running as a Windows service: Start -> Run -> (then type in:) services.msc. When you see PostgresSQL services set them to manual instead of automatic. If you do need them again, just fire up services.msc again and click the Start icon/button once you have reselected the PostgresSQL service.
You can check this out
Type services.msc as previously mentioned and read the path-to-executable as follows;
Path to executable: "C:\Program Files\PostgreSQL\9.3\bin\pg_ctl.exe" runservice -N "postgresql-x64-9.3" -D "C:/Program Files/PostgreSQL/9.3/data" -w
Net service name is defined as postgresql-x64-9.3
So simply, whenever I want to shut down postgresql, I just type the following on a command line instance (to create a cmd instance, type windows+r and enter cmd);
If you run another version of postgresql, you can just check the service name as explained and use this as a shortcut. Hope that it helps.
The accepted answer didn't work for me because everything is greyed out and I can't disable anything.
If you have the same issue, it could be due to privileges.
You will need to launch CMD as an admin user:
Then you can disable PostgreSQL by running the following commands:
Replace 13 with your PostgreSQL version number. You can find the service name by running:
Of course the better solution is to install Linux ;)
This question is old and already answered, but this might help someone. From Windows Command line Start: NET START postgresql-x64-9.2
Stop: NET STOP postgresql-x64-9.2
Change your version and windows. This is for 64-bit windows, version 9.2.