You are not logged in.

#1 2010-04-20 07:29:21

skazhy
Member
From: Riga, Latvia
Registered: 2009-07-01
Posts: 46

[SOLVED] postgreSQL problems

Hi!

I have some problems with postgreSQL. When I run /etc/rc.d/postgresql start it says server starting   [DONE]. There is no postgresql process and when I run /etc/postgresql stop it says pg_ctl: PID file "var/lib/postgres/data/postmaster.pid" does not exist
Is server running? [FAIL]
.  I tried to run the postmaster, but it couldn't find data files.

How can I fix this?

Thanks in advance,

-skazhy

Last edited by skazhy (2010-04-21 05:27:46)

Offline

#2 2010-04-20 09:01:31

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: [SOLVED] postgreSQL problems

What does /var/log/postgresql.log say?

Offline

#3 2010-04-20 09:11:09

skazhy
Member
From: Riga, Latvia
Registered: 2009-07-01
Posts: 46

Re: [SOLVED] postgreSQL problems

postgres cannot access the server configuration file "/var/lib/postgres/data/postgresql.conf": No such file or directory
postgres cannot access the server configuration file "/var/lib/postgres/data/postgresql.conf": No such file or directory
postgres cannot access the server configuration file "/var/lib/postgres/data/postgresql.conf": No such file or directory
postgres cannot access the server configuration file "/var/lib/postgres/data/postgresql.conf": No such file or directory
postgres cannot access the server configuration file "/var/lib/postgres/data/postgresql.conf": No such file or directory
postgres cannot access the server configuration file "/var/lib/postgres/data/postgresql.conf": No such file or directory
postgres cannot access the server configuration file "/var/lib/postgres/data/postgresql.conf": No such file or directory
postgres cannot access the server configuration file "/var/lib/postgres/data/postgresql.conf": No such file or directory
postgres cannot access the server configuration file "/var/lib/postgres/data/postgresql.conf": No such file or directory
FATAL:  data directory "/var/lib/postgres/data" has group or world access
DETAIL:  Permissions should be u=rwx (0700).

I copied .conf files to /var/lib/postgres/data but still, it cant found it. I changed permissions to 700 too, but it still doesnt work :(
FATAL:  data directory "/var/lib/postgres/data" has group or world access
DETAIL:  Permissions should be u=rwx (0700).
FATAL:  data directory "/var/lib/postgres/data" has group or world access
DETAIL:  Permissions should be u=rwx (0700).

Offline

#4 2010-04-20 22:33:40

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: [SOLVED] postgreSQL problems

Try running:

su - postgresql
initdb -D /var/lib/postgres/data/

Offline

#5 2010-04-21 05:27:26

skazhy
Member
From: Riga, Latvia
Registered: 2009-07-01
Posts: 46

Re: [SOLVED] postgreSQL problems

thanks, fukawi2! now it works! smile

Offline

Board footer

Powered by FluxBB