Start stop Postgresql in Linux :
Here we are using postgresql of version 15.
systemctl status postgresql-15
systemctl stop postgresql-15
systemctl start postgresql-15
or, with pg_ctl commands also, we can do the same.
- Start the Postgresql Service
Syntax :
pg_ctl start -D /path/to/your/data_directory
Optionally, you can specify a log file:
Syntax :
pg_ctl start -D /path/to/your/data_directory -l /path/to/logfile
2. Stop the Postgresql Services :
Syntax :
pg_ctl stop -D /path/to/your/data_directory