Re: could not open file "global/pg_database" - Mailing list pgsql-novice

From Tom Lane
Subject Re: could not open file "global/pg_database"
Date
Msg-id 22734.1192716639@sss.pgh.pa.us
Whole thread Raw
In response to could not open file "global/pg_database"  (Sylvain Brohee <sbrohee@ulb.ac.be>)
List pgsql-novice
Sylvain Brohee <sbrohee@ulb.ac.be> writes:
> When I initiate the databases with initdb without argument. It seems to works
> ...
> But it I try to run the daemon with

> pg_ctl -D /home/postgres/data -l logfile start, I get this :
> Postmaster running (and that's all, nothing is added in logfile) ... and the
> server does not seem to work.

Hmm ... "postmaster starting" is all that you should see from pg_ctl,
but the lack of anything in the logfile is very suspicious.  Try it
with -w to see if pg_ctl reports the postmaster really does start.

> It seems that the server cannot get access to global/pg_database but why? Even
> if all the of this file (777) are available. It cannot get access to it?

"No such file or directory" is not a permissions problem.  What I
suspect is that your new postmaster didn't start, and the reason is
that there's still an old postmaster hanging around and monopolizing
the port number, and that you've managed to cut that old postmaster
off at the knees by deleting its database directory tree out from
under it.  If so you need to find and kill the old postmaster (or
maybe a quick system reboot would be easiest).

Or it could be something even more mundane than that, like there's
no permission to write the logfile.  But in any case I bet you're
not talking to the same postmaster process you think you are.

            regards, tom lane

pgsql-novice by date:

Previous
From: Sylvain Brohee
Date:
Subject: could not open file "global/pg_database"
Next
From: Mary Anderson
Date:
Subject: Do I really have to convert text to varchar and varchar to varchar[] to do an INSERT?