pg_dump fails with error "The database system is starting up"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • melaniejp
    New Member
    • Sep 2011
    • 5

    pg_dump fails with error "The database system is starting up"

    One of our customers who using PostgreSQL7.2.1 encountered the following error when they back up the database using pg_dump.exe.

    [command]:
    pg_dump.exe -f <filename> <dbname>

    [error message]:
    pg_dump.exe: [archiver (db)] connection to database "<dbname>" failed: FATAL 1: The database system is starting up

    When "The database system is starting up" error occurs?
    On the same system, other sql commands(such as drop table, select,delete, etc) can be executed even after the error.

    What is the problem and is there any solution?

    Thanks in advance.
  • rski
    Recognized Expert Contributor
    • Dec 2006
    • 700

    #2
    On the same system, other sql commands(such as drop table, select,delete, etc) can be executed even after the error.
    What do you mean "even after the error".
    Is the database working correctly?

    Comment

    • melaniejp
      New Member
      • Sep 2011
      • 5

      #3
      re: pg_dump fails with error &quot;The database system is starting up&quot;

      >What do you mean "even after the error".
      >Is the database working correctly?

      Yes. Only pg_dump fails.

      Comment

      • rski
        Recognized Expert Contributor
        • Dec 2006
        • 700

        #4
        Are there any othe error messages? Maybe somehting was written to the log file.

        Comment

        • hikmat
          New Member
          • Sep 2011
          • 4

          #5
          Use the pg_dump -U username -f filename.sql databasename OR pg_dump -U username databasename > filename. It will prompt for a password you would have to enter the password.
          Or use pg_dumpall function and see what happens. If you get error with particular table not dumping you can use pg_dump with -t or -T to dump certain table.

          Comment

          • melaniejp
            New Member
            • Sep 2011
            • 5

            #6
            It seems that postgresql has not been startup yet at the moment, because other SQL commands can be executed even after the error. This phenomenon happened at one of our customer and I suggested to execute pg_dump after some minutes, and not soon after postgresql being started.

            Thank you very much, rski and hikmat.

            Comment

            Working...