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

From: "Tri Quach" <tquach(at)k12(dot)hi(dot)us>
To: <pgsql-general(at)postgresql(dot)org>
Subject: createuser: could not connect to database postgres: FATAL: could not open file "global/pg_database": No such file or directory
Date: 2008-03-21 00:54:28
Message-ID: 20080321005430.3D8A33EF6@mailrelay.k12.hi.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi All,

I need your help to fix this problem.

When I ran initdb, I got the warning error below.

Then I tried to create a user. I got error "createuser: could not connect
to database postgres: FATAL: could not open file "global/pg_database": No
such file or directory". Please see the out put below.

Thank you for your help.

Tri.

-bash-2.05b$ initdb --lc-collate=C

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 locales

COLLATE: C

CTYPE: en_US.UTF-8

MESSAGES: en_US.UTF-8

MONETARY: en_US.UTF-8

NUMERIC: en_US.UTF-8

TIME: en_US.UTF-8

The default database encoding has accordingly been set to UTF8.

creating directory /var/lib/pgsql/data ... ok

creating subdirectories ... ok

selecting default max_connections ... 100

selecting default shared_buffers/max_fsm_pages ... 24MB/153600

creating configuration files ... ok

creating template1 database in /var/lib/pgsql/data/base/1 ... ok

initializing pg_authid ... ok

initializing dependencies ... ok

creating system views ... ok

loading system objects' descriptions ... 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:

postgres -D /var/lib/pgsql/data

or

pg_ctl -D /var/lib/pgsql/data -l logfile start

-bash-2.05b$ pg_ctl -D /var/lib/pgsql/data -l logfile start

server starting

-bash-2.05b$ createuser -A -D -P nssb

Enter password for new role:

Enter it again:

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-03-21 01:56:57 Re: createuser: could not connect to database postgres: FATAL: could not open file "global/pg_database": No such file or directory
Previous Message Andrej Ricnik-Bay 2008-03-20 23:28:55 Re: [postgis-users] how many min. floating-points?