Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to restore a dump done with pg_dumpall > mybak.sql from a server that has 1 table in a different tablespace that the default one.

On the target machine I have recreated the directory structure of the tablespace and it is owned by the postgres user with read/write permissions but still the restore is failing. Any suggestions?

command used to restore is:

psql mydb -f mybak.sql


share|improve this question
I see that you managed to solve the problem, but when having errors and asking about them, it is always advisable to post the actual error message, too. – dezso Jan 27 '14 at 9:14
Yep, always include PostgreSQL version (select version()) and exact text of any error message. – Craig Ringer Jan 27 '14 at 9:23
Thanks! will do so for next questions. – Fabrizio Mazzoni Jan 27 '14 at 9:43

Got it,

had to recreate the tablespace manually on target before restoring the dump.

Thanks anyway

share|improve this answer

Your Answer


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.