Adding/removing tablespaces
Tablespaces are a feature in PostgreSQL that allow the user to specify different physical devices on which to store data. We may want to do that for performance or administrative ease, or our database may have run out of disk space.
Getting ready
The very first action, when creating a tablespace in PostgreSQL, is to double-check that you actually need to create a tablespace. This is because tablespaces in PostgreSQL have a different purpose than tablespaces in some other database systems.
The only purpose of having multiple tablespaces is to use a certain directory when storing data files for specific tables or indexes. There are no other implications in terms of crashes or disaster recovery: you need all the tablespaces for the database to operate correctly!
If you are thinking of placing some tables on a separate tablespace so they can be recovered separately from the rest of the database, then know this is not how PostgreSQL works. Relational...