Search code examples
postgresqlaltertablespace

ERROR: unrecognized configuration parameter "tablespace"


I'm trying to move a database in Postgres 8.2 to a new tablespace, but when running ALTER DATABASE data_base_name SET TABLESPACE TO tbspc_name the following error appears ERROR: unrecognized configuration parameter "tablespace".


Solution

  • It seems that in Postgres 8.2 you have two options:

    • move tables one by one, see ALTER TABLE ...;
    • backup the database, create a new one with a tablespace defined, and restore the backup in the new database, see CRETE DATABASE ....