I want to make the postgresql server on my linux machine to start automatically at system boot. i added the following line in ~/.profile file:
su -c 'pg_ctl start -D /var/lib/pgsql/data ' postgres
however the postgres server doesn't start untill i lauch the console command . i'm then prompted to input password of user 'postgres' and then the server starts up correctly.
i want to avoid the two extar steps of lauching the linux console and entering the password for 'postgres' user. How can i do that?