#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Location
    bangalore , india
    Posts
    14
    Rep Power
    0

    Unhappy postgresql startup


    please tell me how do i start postgresql
    during the startup the postmaster tries to start and fails
    it is a redhatlinux machine and it is the server
    i have my own userid and passwd

    i tried starting it using
    /etc/rc.d/init.d/postgresql start
    but gives an error as file not found

    the postgress is installed in the system already


    please help
    Last edited by kavya; January 6th, 2004 at 03:08 AM.
  2. #2
  3. Prom night: 1973
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Dec 2001
    Posts
    1,156
    Rep Power
    24
    I use pg_ctl to start postgres. You can specify a log filename with the -l option.

    pg_ctl -l /usr/local/pgsql/logfile.txt start

    Try this, and then look at the contents of logfile.txt. If there's an error at the end of the log file, post it here and I'll try to help.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    373
    Rep Power
    11
    did U do the initdb step?
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Location
    bangalore , india
    Posts
    14
    Rep Power
    0

    Unhappy


    hai thax for the reply
    i tried using the
    pg_ctl -l /usr/bin/postgreql/lib/logfile.txt start

    and

    initdb

    but the error i get is
    bash : pg_ctl : command not found
    and bash : initdb :command not found

    please reply for this
    kavya
  8. #5
  9. Prom night: 1973
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Dec 2001
    Posts
    1,156
    Rep Power
    24
    You need to find out where these files are. Assuming you're using Unix, try

    locate pg_ctl

    or

    find / -name pg_ctl

    Those files are in /usr/local/pgsql/bin on my computer. Once you know where they are, add their directory to your PATH variable. For instance, using my postgres directory:

    export PATH=$PATH:/usr/local/pgsql/bin

    Now you should be able to use initdb. Let us know if this works.
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Location
    bangalore , india
    Posts
    14
    Rep Power
    0

    Unhappy


    thanx for the reply

    i tried them as follows
    1. locate pg_ctl
    gave the following o/p
    locate:warning:database 'var/lib/locate/locatedb' is more than 8 days old
    /usr/lib/posgresql/bin/pg_ctl
    /usr/share/man/man1/pg_ctl.1.gz

    2. export PATH=$PATH:/usr/lib/postgresql/bin

    3.initdb
    gave the following message
    initdb: you must identify where the data for this database system will reside. do this with either a -D invocation option or a PGDATA environment variable

    please
    go thru
    and reply

    kavya
  12. #7
  13. Prom night: 1973
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Dec 2001
    Posts
    1,156
    Rep Power
    24
    Okay, there's a manual section for what you're doing. It clearly states two solutions to make the initdb command work. If you keep reading, it will tell you how to get Postgres working.

    The manual isn't fantastic, but taking the time to read it before you post a question will save you time.
  14. #8
  15. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Location
    bangalore , india
    Posts
    14
    Rep Power
    0
    thanx for the link
    i'll try
  16. #9
  17. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    2
    Rep Power
    0

    Running INITDB command


    I installed PostgresSQL 9.2 on Windows XP and want to run INITDB command. In order to run the command I opened and logged on SQL Shell and am at the command prompt 'postgres-#'. What should I type to run it?

IMN logo majestic logo threadwatch logo seochat tools logo