cannot open pg_database - Mailing list pgsql-general

From Jim Bryan
Subject cannot open pg_database
Date
Msg-id 20060820031853.5075.qmail@web33506.mail.mud.yahoo.com
Whole thread Raw
Responses Re: cannot open pg_database  (Roman Neuhauser <neuhauser@sigpipe.cz>)
Re: cannot open pg_database  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Installing with yum, Fedora core 5.  Get error: "could
not open file "global/pg_database": No such file or
directory."   The file exists however, in
/var/lib/pgsql/data/global and contains 3 lines:
“postgres” 10793 1663 499 499
“template” 1 1663 499 499
“template0” 10792 1663 499 499

From the user-comments in manual, chapter 17.1 :
“If you get an error like
psql: FATAL: could not open file "global/pg_database":
No such file or directory
make sure that in your init.d postgresql file (if you
have one) or in the env variables for the shell that
runs your server process that PGDATA is set properly.
Then try to restart the server. If the server will not
restart, check for an already running server process
(sudo ps -af | grep postgres). Sometimes they can hang
around, secretly, and screw things up.”

As newbie, reluctant to start editing the init.d file.
 Ideas appreciated.

*****************
bash-3.1$ su -c 'pg_ctl start -D /usr/local/pgsql/data
-l serverlog' postgres
Password:
postmaster starting
bash-3.1$  psql template1
psql: FATAL:  could not open file
"global/pg_database": No such file or directory



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

pgsql-general by date:

Previous
From: John Gunther
Date:
Subject: Confused about locales
Next
From: Jim
Date:
Subject: service postgresql start : failed