[ubuntu-za] Database Problems - Installing PostgreSQL

Matthew French matthew at gillyweed.co.za
Tue Jan 26 17:36:55 GMT 2010


On 26 Jan 2010, at 11:13 AM, Ian Whitfield wrote:
> 1) I tried the "Check that postgres is running:"
> 
> $ ps -ef | grep postgres
> 
> and get
> 
> postgres 2488 2356 0 10:45 pts/1 00:00:00 su - postgres
> postgres 2497 2488 0 10:45 pts/1 00:00:00 -su
> postgres 2504 2497 0 10:55 pts/1 00:00:00 ps -ef
> postgres 2505 2497 0 10:45 pts/1 00:00:00 grep postgres
> 
> No idea what this is telling me!!

Ah. My apologies, been doing Unix for too long.

The "ps" command lists running processes. The "grep" command is a filter. The pipe "|" passes the output of one command as input to the next command.

Try:
# man ps

and:
# man grep

For the relevant help files, which should be installed by default. The "man" command is for manuals, BTW.

In this case what it is telling us is that you have an "su" command running, and you are running the ps and grep commands as the user postgres.

What is missing is any of the postgres processes. This tells us the database is not running. It doesn't tell us why, but at least we now know your problem is getting Postgres started.

Check your config files again and try:
# /etc/init.d/postgresql-8.4 start

Run the above ps command again to see if the database processes are running. If they aren't, or stop soon afterwards, then you have a problem and will need to look at the log files. 

- Matthew





More information about the ubuntu-za mailing list