How to start and stop PostgreSQL database in windows

How to start and stop PostgreSQL database in windows

In this post, going to explaining how to start and stop the PostgreSQL database in windows. PostgreSQL starts and stop is different from the environment to the environment.

Open Windows Services

Press Windows+R, and type the services.msc and then you can find the PostgreSQL server service name and there you can not find the start and stop options.

So that you need to take the service name here and execute the start and stop in the command prompt

Here PostgreSql server service name is postgresql-x64-13

Start PostgreSQL Server

Open the command prompt through the admin user and then execute the following command

Open Admin Command Prompt

  • Go to start
  • Type command prompt in the search box
  • Right-click on the command prompt
  • Select Run as Administrator

And then execute the following command

Syntax:

C:\WINDOWS\system32>net start <service-name>

Example

C:\WINDOWS\system32>net start postgresql-x64-13

postgresql-service-start

postgresql-service-start

 

Stop PostgreSQL Server

Open the command prompt through the admin user and then execute the following command

Open Admin Command Prompt

  • Go to start
  • Type command prompt in the search box
  • Right-click on the command prompt
  • Select Run as Administrator

And then execute the following command

Syntax:

C:\WINDOWS\system32>net stop <service-name>

Example

C:\WINDOWS\system32>net stop postgresql-x64-13

postgresql-service-stop

postgresql-service-stop

 

 

Leave a Reply