Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

pg_restore is taking too long to finish. I already performed the following

  • service postgresql initdb
  • /etc/init.d/postgresql start
  • Modified /var/lib/pgsql/data/pg_hba.conf to use

    local all all trust

    host all all 127.0.0.1/32 ident sameuser

    host all all ::1/128 ident sameuser

  • /etc/init.d/postgresql restart

What could be the problem?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

It turns out out I was missing a parameter. What I was doing was

pg_restore -U postgres -d /path/to/backup/file/file.backup

instead of

pg_restore -U postgres -d databasename /path/to/backup/file/file.backup

I'm still not sure if the first one is not correct. I swear I could remember using that same syntax before.

share|improve this answer
    
The first one is incorrect. It will attempt to read a backup file from STDIN, not from your file. –  Magnus Hagander Sep 30 '09 at 8:35
    
Cool. Thanks, Magnus. Could you explain more about it? –  Randell Sep 30 '09 at 14:05
1  
The backup is sitting in the shell, waiting for input from the shell. As such, it never starts, because no input is received. –  Avery Payne Oct 9 '09 at 14:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.