Ubuntu get PostGreSQL running

Solution 1:

You can know the status of your Postgres server via the command

sudo /etc/init.d/postgresql-8.3 status

To start it you can issue the command

sudo /etc/init.d/postgresql-8.3 start

and to stop you can issue the command

sudo /etc/init.d/postgresql-8.3 stop

Solution 2:

First, check whether the server is running or not. The command for checking this is:

service postgresql status

it will check the status of server if you found

postgresql.service - PostgreSQL RDBMS

Loaded: loaded (/lib/systemd/system/postgresql.service; disabled; vendor pres

Active: inactive (dead)

Then you have to restart the server by the given command and mostly this problem is coming in 9.6.1 version of PostgreSQL.

service postgresql restart

Then the PostgreSQL server will run correctly in Ubuntu terminal