Can't start postgresql on a fresh 11.2 install

Hello all,

I can’t start postgresql and logs are empty. Here is the complete steps I did so far:

I just installed Opensuse 11.2, got it up to date. Then I zypped in postgresql and postgresql-server.

When I first did rcpostgresql start, after a while (a minute or so of waiting) I got a message “could not start server”. Bummer.

So, I logged in as user postgres (which was successfully created), and issued:
initdb -D /var/lib/pgsql/data

Looking at /var/lib/pgsql/initlog everything was created just fine.

Then I did:
/usr/bin/pg_ctl -D /var/lib/pgsql/data -l logfile start
I got a message: server starting, but the server never got started.

logfile was empty.

rcpostgresql start as root still fails without explanation.

Any ideas on what could be wrong or missing?

Thanks,
Dejan

Try with a user account and see what is happening.
Login as a normal user.

mkdir data
initdb -D data
postgres
ps -ef | grep postgres
cat data/postmaster.log

Syampillai,

Thanks! That actually helped since I got to look in ~/data/postmaster.log

The problem was simple:


2010-01-08 20:04:46 CET   LOG:  could not translate host name "localhost", service "5432" to address: Name or service not known

I fiddled about with /etc/hosts and changed the hostname. I should probably readd “localhost” for 127.0.0.1

Anyway, I edited postgresql.conf and added line:

listen_addresses = ‘my_host_name’

Now everything seems to work.

Thanks for pointing me to the right direction :slight_smile:

P.S. I should probably mark this thread as solved. How would I go about that?

Nice to hear that the problem is fixed.

As far as I know, there is no way that normal forum users can mark a thread as SOLVED.