4

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?

1 Answer 1

5

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.

4
  • 3
    The first one is incorrect. It will attempt to read a backup file from STDIN, not from your file. Sep 30, 2009 at 8:35
  • Cool. Thanks, Magnus. Could you explain more about it?
    – Randell
    Sep 30, 2009 at 14:05
  • 6
    The backup is sitting in the shell, waiting for input from the shell. As such, it never starts, because no input is received. Oct 9, 2009 at 14:25
  • Note, databasename is the name of an existing database in your postgres instance where restored dump will be placed
    – Klesun
    Mar 17, 2021 at 14:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .