pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
could not open  file "global/pg_database"
2+ messages / 2 participants
[nested] [flat]

* could not open  file "global/pg_database"
@ 2007-10-18 12:56 Sylvain Brohee <sylvain@scmbb.ulb.ac.be>
  2007-10-18 16:25 ` Re: could not open  file "global/pg_database" Alvaro Herrera <alvherre@commandprompt.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Sylvain Brohee @ 2007-10-18 12:56 UTC (permalink / raw)
  To: pgsql-admin

Dear PostgreSQL users,

First of all sorry for double-posting my question on this forum and on the 
newbie forum. 

I'm running postgreSQL 8.1 (installed with YaST) on a Suse 10.2 machine.
My $PGDATA variable is /home/postgres/data

When I initiate the databases with initdb without argument. It seems to works 
as I get this : 
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale en_US.UTF-8.
The default database encoding has accordingly been set to UTF8.

fixing permissions on existing directory /home/postgres/data ... ok
creating directory /home/postgres/data/global ... ok
creating directory /home/postgres/data/pg_xlog ... ok
creating directory /home/postgres/data/pg_xlog/archive_status ... ok
creating directory /home/postgres/data/pg_clog ... ok
creating directory /home/postgres/data/pg_subtrans ... ok
creating directory /home/postgres/data/pg_twophase ... ok
creating directory /home/postgres/data/pg_multixact/members ... ok
creating directory /home/postgres/data/pg_multixact/offsets ... ok
creating directory /home/postgres/data/base ... ok
creating directory /home/postgres/data/base/1 ... ok
creating directory /home/postgres/data/pg_tblspc ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 1000
creating configuration files ... ok
creating template1 database in /home/postgres/data/base/1 ... ok
initializing pg_authid ... ok
enabling unlimited row size for system tables ... ok
initializing dependencies ... ok
creating system views ... ok
loading pg_description ... ok
creating conversions ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the -A option the
next time you run initdb.

Success. You can now start the database server using:

    postmaster -D /home/postgres/data
or
    pg_ctl -D /home/postgres/data -l logfile start

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.

If I try create a database 

createdb testdb

createdb: could not connect to database postgres: FATAL:  could not open 
file "global/pg_database": No such file or directory

If I try to create a user

createuser sylvain
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) n
Shall the new role be allowed to create more new roles? (y/n) n
createuser: could not connect to database postgres: FATAL:  could not open 
file "global/pg_database": No such file or directory

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?

Does somebody as any idea?

Thanks a lot,

Sylvain



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: could not open  file "global/pg_database"
  2007-10-18 12:56 could not open  file "global/pg_database" Sylvain Brohee <sylvain@scmbb.ulb.ac.be>
@ 2007-10-18 16:25 ` Alvaro Herrera <alvherre@commandprompt.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Alvaro Herrera @ 2007-10-18 16:25 UTC (permalink / raw)
  To: Sylvain Brohee <sylvain@scmbb.ulb.ac.be>; +Cc: pgsql-admin

Sylvain Brohee wrote:

> If I try create a database 
> 
> createdb testdb
> 
> createdb: could not connect to database postgres: FATAL:  could not open 
> file "global/pg_database": No such file or directory

That's pretty strange.  Is there a global/pg_database file in $PGDATA?
Who's the owner?

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2007-10-18 16:25 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-10-18 12:56 could not open  file "global/pg_database" Sylvain Brohee <sylvain@scmbb.ulb.ac.be>
2007-10-18 16:25 ` Alvaro Herrera <alvherre@commandprompt.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox