Postgresql – pg_restore is taking too long to finish. What could be the problem

postgresql

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?

Best Answer

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.