Sample Exam Questions
Immediately after installation, two template databases and one regular database are included.
High availability can be achieved by building and mirroring multiple databases in a database cluster.
Since the character set of each database can be set differently for each database, one database in the database cluster can be set to UTF8, and another database can be set to EUC_JP, and so on.
Because information about database users is kept in each database that is built in a database cluster, users must be created by performing an operation such as CREATE USER on each database to allow access to a particular database.
The pg_dump command for database backups cannot back up common data in a database cluster, so you must use the pg_dumpall command to back up that portion.
※This sample exam is different from those that appear in the actual OSS-DB Exam.
2024/05/07
PostgreSQL maintains a collection of multiple databases (database cluster) in a single server process. Immediately after installation, it contains two template databases, template0 and template1, and a regular database called postgres.
When you think of a cluster, you might think of a state that does things like mirroring between separate entities, but a PostgreSQL database cluster is just a collection of databases, without the ability to mirror between individual databases. For high availability, use techniques such as replication to replicate the entire database cluster.
You can set a different character set for each database. When you create a new database cluster with the initdb command, you specify the character set to use for template1, and postgres, which is created by copying it, will have the same character set. Later, when you add a database, for example with the createdb command, it defaults to the same character set as template1, but you can set any character set by specifying template0 as the template database.
User information is created in the global area of the database cluster and is common to all databases in the cluster. Settings, such as whether each user is allowed to connect and whether operations on individual objects are allowed, can be set on each database. However, CREATE USER is a user creation for a database cluster, not an operation on individual database.
Database user information is not included in each database and cannot be backed up by the pg_dump command. Although the pg_dumpall command backs up all databases in the cluster, you can specify the -g option to back up only the information contained in the global region of the cluster (in particular, role and tablespace information).
So the correct answers are A, C, and E.
© EDUCO All Rights Reserved.