echothrust/howtos

A list of OpenBSD (mostly) material

View on GitHub

Export and Import Methods

Export schema and import to a new tablespace on the same DB

You cannot move the whole schema from one tablespace to another, especially if you have LOBs. What you need to do is either transfer only the data (without the LOBs), which is too much of a trouble and you may loose some information unless you are extremely careful. Or you can export the schema you want to move to another tablespace, delete the objects of that schema and import the objects to new tablespace. In order to export a schema and import it to the same database but to new tablespace you need to: