Results 1 to 4 of 4

Thread: Createdb failed

  1. #1
    Join Date
    Jan 2004
    Posts
    8

    Unanswered: Createdb failed

    Dear all,

    when i run the createdb statement is is giving the following error:
    $ createdb test
    psql: FATAL: File /usr/local/pgsql/data/base/1/PG_VERSION is missing. This is not a valid data directory.
    createdb: database creation failed.

    i am able to start the te postgre server using the pg_ctl command and te postmaster is running .

    i am using postgresql 7.3.4 and Red Hat Enterprise Linux ES release 3 (Taroon)

    please help

  2. #2
    Join Date
    Nov 2004
    Posts
    4
    I don't think you should start PostgreSQL with the command pg_ctl anymore....
    try starting PostgreSQL from the init script:

    # /etc/init.d/postgresql start

    That script will run initdb if necesary, and set the PGDATA environment variable if needed also.

  3. #3
    Join Date
    Jan 2004
    Posts
    8
    Ok, anyway postmaster is running and i am able to login to use the template1 database.

    but createdb only is failing

  4. #4
    Join Date
    Sep 2001
    Location
    Vienna
    Posts
    400

    initdb

    did you make an initdb to initialize a database

    PG_VERSION is only a textfiel with the postgresql version in it which created the instance
    http://www.postgresql.org
    --Postgresql is the only kind of thing--

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •