setting "default_tablespace" is not allowed
Hello, I'm migrating my payload3 db and when restoring I get this, and a bunch of following errors, how can I fix that?
4 Replies
That's the following errors, other are similar:
Hi, the error tells that the table "about_us" does not exist, but the restore process is trying to create a sequence that is associated with this table.
Can you check in the dump file whether there is a CREATE statement for the table about_us, before the alter sequence command?
If there isn't such a statement, it is a problem of the source database or dump file. If there is a statement that creates the table about_us before the alter sequence, then it's something wrong with creating it in Xata.
In any case if you can upload the dump file somewhere (i.e. google drive) and send us a link to download and test it to [email protected] , we can have a look.
As for the default_tablespace, that is a filesystem management command which is not supported in Xata, as the storage configurations are managed by us. Perhaps the dump was created by a server that had customizations there. You can edit it out of the dump file.
Hey, @kostas
Thanks for the reply, the dump is creating table, which made me puzzled. I was concerned with this line
about_us_id_seq postgres
which seems to set wrong owner when creating a sequence
But setting --role
flag to proper owner fails as it's not supported by XataAs xata does not provide support for roles yet, we recommend using the --no-owner flag when exporting with pg_dump. See the export section for reference: https://xata.io/docs/postgres#export
There are some additional flags that we suggest there. Can you try running pg_dump with these parameters and see if that fixes the problems during import?
In case that fails, you can send us the dump file to try restoring and troubleshoot