In this chapter, we explored the basic building blocks of PostgreSQL. There are several shared objects across the database cluster. These shared objects are roles, tablespaces, databases, including template databases, template procedural languages, and some setting parameters. The tablespace is a defined storage normally used by the database administrator for optimization or maintenance purposes.
The template1 database is cloned each time a database is created. It can be loaded with extensions that should be available for all new databases. The template0 database provides a fallback strategy in case the template1 database is corrupted. Also, it can be used if the template1 locale isn't the required locale.
The role has several attributes, such as login, superuser, and createdb. The role is called a user in the older PostgreSQL version if it can log into the database...