Stopping, Starting the Postgres Database

Aruba Employee
Aruba Employee

Normally it's running and the OS makes sure of that. You can generally start, stop, and restart it with the service command like this:

# service postgresql start|stop|restart|status
Sometimes it's necessary to get more info about why it fails to start. This command will give you that:
# su -l postgres -c "/opt/airwave/bin/postmaster -p 5432 -D '/var/lib/pgsql/data'"

[root@g6t0037 log]# su -l postgres -c "/usr/bin/postmaster -p 5432 -D '/var/lib/pgsql/data'"
su: warning: cannot change directory to /home/postgres: No such file or directory
postmaster cannot access the server configuration file "/var/lib/pgsql/data/postgresql.conf": Permission denied
[root@g6t0037 log]#
[root@g6t0037 log]# ls -l /var/lib/pgsql/data/postgresql.conf
-rw------- 1 root root 13658 Dec 11 05:23 /var/lib/pgsql/data/postgresql.conf
[root@g6t0037 log]#

cd /var/lib/pgsql

chown -R postgres.postgres /var/lib/pgsql/* (change to postgres group/username)

service postgrsql restart

http -> showing server encountered errors : 

make (helps check file permissions, checks the code...::...puts it int eh place, checks configuration files)

./nightly_maintenance -stuck in there: restarting apache

ps -el | grep nightly_maintenance

ml --> make;

Version history
Revision #:
1 of 1
Last update:
‎06-09-2014 10:30 AM
Updated by:
Labels (1)
Search Airheads
Showing results for 
Search instead for 
Did you mean: