May 2019
Intermediate to advanced
600 pages
20h 46m
English
Some more notes on best practices follow.
A tablespace can contain objects from multiple databases, so it's possible to be in a position where there are no objects visible in the current database. The tablespace just refuses to go away, giving the following error:
ERROR: tablespace "old_tablespace" is not empty
You are strongly advised to make a separate tablespace for each database to avoid confusion. This can be especially confusing if you have the same schema names and table names in the separate databases.
How do you avoid this? If you just created a new tablespace directory, you might want to create subdirectories within that for each database that needs space, and then change the subdirectories to tablespaces instead. ...
Read now
Unlock full access