Tablespacesare designed to allow Postgres clusters to be spread across multiple storage devices.Create tablespacecreates a symbolic link in thepg_tblspcdirectory in the cluster's data directory pointing to the newly-created tablespace directory.
Unfortunately, though there is acommandto move tables and indexes between tablespaces, there is no command to move tablespaces to different directories. However, since Postgres 9.2, the process of moving tablespaces is quite simple:
Record theoidof the tablespace you want to move
Shut down the Postgres cluster
Move the tablespace directory, either within the same file system or to a different file system
Update theoidsymbolic link that represents the moved tablespace to the new tablespace directory location