Categories: Uncategorized

Start Stop Disable Postgresql service

When you install PostgreSql database on a windows machine, it installs a service on the system. The operation of this service can be controlled from Services management console.  This console can be opened by running the command services.msc from Run window. You can see services listed in this console. Look for the service with the name postgresql.  You can open the service properties window by double-clicking on the service entry. From this properties window you can start/stop/restart the service and also change the start up type to manual or Automatic or disabled.Another method to control Postgresql service is through windows command line. Below given are the commands for various operations.

Start Postgresql service

Exact command depends on the version of the Postgresql you are running. For the version 9.0 below is the command to start the service.

net start postgresql-9.0

Stop Postgresql service

net stop postgresql-9.0

Disable Postgresql service

sc config postgresql-9.0 start= disabled

Change Postgresql to manual start.

sc config postgresql-9.0 start= demand

Set the service start type to automatic

sc config postgresql-9.0 start= auto 

Restart the service from windows command prompt(CMD).
net stop postgresql-9.0 & net start postgresql-9.0
Srini

Recent Posts

Add new user account from command line (CMD)

Adding users from command line is much easier than going through the UI. It saves…

4 years ago

Delete directory from command line [Rmdir]

Do you want to delete a directory from Windows command prompt(CMD)? This post explains how…

4 years ago

TaskKill: Kill process from command line (CMD)

We can kill a process from GUI using Task manager. If you want to do…

4 years ago

Kill Chrome from command line

Chrome is definitely the stable browser compared to other ones and it has been my…

4 years ago

Find windows OS version from command line

Windows has multiple command line utilities that can help find the version of the Windows…

4 years ago

How to check if Windows 32 or 64 bit?

There are multiple ways to check whether a Windows computer is running 32-bit OS or…

7 years ago