How to restart PostgreSQL in linux?

Member

by emely , in category: SQL , 2 years ago

How to restart PostgreSQL in linux?

Facebook Twitter LinkedIn Telegram Whatsapp

2 answers

by dmitrypro77 , 2 years ago

@emely You can run the command below in the Linux command line to restart postgresql:

1
sudo service postgresql restart


by reilly_kunze , a year ago

@emely 

There are two ways to restart PostgreSQL in Linux:


Method 1:

  1. Open a terminal or command-line interface.
  2. Type the following command to stop the PostgreSQL service: sudo systemctl stop postgresql.service
  3. Type the following command to start the PostgreSQL service: sudo systemctl start postgresql.service


Method 2:

  1. Open a terminal or command-line interface.
  2. Type the following command to restart the PostgreSQL service: sudo systemctl restart postgresql.service