This article covers how to install PostgreSQL on your Ubuntu 20.04 LTS machine. In fact, PostgreSQL, or Postgres, is a relational database management system that provides an implementation of the SQL querying language. It's standards-compliant and has many advanced features like reliable transactions and concurrency without read locks.
Service commands for PostgreSQL
The PostgreSQL database server runs as a service under the name "postgresql". You can manage the service by running the commands below.
1. Stop PostgreSQL server:
$ sudo systemctl stop postgresql
2. Start PostgreSQL server:
$ sudo systemctl start postgresql
3. Restart PostgreSQL(e.g. after changing configuration settings) server:
$ sudo systemctl restart postgresql
4. Reload PostgreSQL server:
$ sudo systemctl reload postgresql
5. Check PostgreSQL status:
$ sudo systemctl status postgresql