Limited-Time Offer: Enjoy 50% Savings! Coupon code: 50OFF Use it at checkout
Skip to content

Free EnterpriseDB PostgreSQL Essentials Certification v13 PostgreSQL-Essentials Exam Questions

Last updated: · 11 practice questions with answers and explanations

Page: 1 / 8 Total 71 questions

Want more questions? Get Premium Access.

Question 1

New Single answer

Topic: PostgreSQL database architecture

Skill tested: Distinguishes PostgreSQL clusters, server instances, databases, and client connections.

A reporting team connects to two databases named `sales` and `warehouse` on the same PostgreSQL host. An administrator explains that both databases use the same PostgreSQL server process environment and share the instance's configuration and WAL stream, but ordinary SQL queries cannot join tables across them as if they were schemas. The team proposes creating a second database cluster solely to isolate the reporting workload, although no separate settings, data directory, or server lifecycle is required. Which explanation best describes the current architecture and the least disruptive design?

Correct Answer: D. The databases belong to one PostgreSQL cluster; use schemas within an appropriate database if the workload needs logical organization rather than independent cluster-level administration.
Explanation:

A PostgreSQL cluster is a database storage area managed by one server instance; it can contain multiple databases. Those databases share instance-level configuration and the cluster's WAL, but database objects are normally scoped to a database, so ordinary SQL does not directly query across databases. Schemas can provide namespace-level organization inside a database when that is sufficient. Creating another cluster is appropriate when independent data directories, configuration, lifecycle, or administrative isolation is needed, none of which the scenario requires.

Question 2

New Single answer

Topic: Installation and upgrading

Skill tested: Selects an in-place major-version upgrade method while preserving the existing cluster safely.

A company is moving a large PostgreSQL 12 cluster to PostgreSQL 13 on the same server. The database is too large for a lengthy logical dump and restore, the organization can schedule a maintenance window, and the source and target binaries can be installed side by side. The team has verified that the extension versions and operating-system requirements are compatible. It must preserve the existing data efficiently while ensuring the original cluster remains available for rollback until the upgrade is validated. Which plan is most appropriate?

Correct Answer: A. Initialize a PostgreSQL 13 target cluster and use `pg_upgrade` in check mode, then perform the upgrade during the maintenance window using copy mode and retain the unchanged source cluster until validation.
Explanation:

`pg_upgrade` is designed to move a cluster between major PostgreSQL versions more quickly than logical dump and restore, subject to its compatibility checks. Running check mode before the maintenance operation identifies many prerequisites without modifying the clusters. Copy mode leaves the source data files intact, which supports rollback during validation, though it requires additional disk space. Link mode is faster and space-efficient but shares files, so the old cluster cannot serve as an independent fallback. A raw data-directory copy across major versions is not a valid upgrade procedure.

Question 3

New Multiple answers

Topic: Configuration and maintenance

Skill tested: Configures WAL archiving and audit-log destination settings with appropriate operational controls.

A regulated service runs PostgreSQL 13 and must retain an external copy of completed WAL segments for point-in-time recovery, while keeping database audit logs in a designated directory that operations can monitor. The team has already implemented and tested a reliable archive receiver command, and the database administrator will apply settings that require a server restart during a maintenance window. The security team also requires the audit log filename setting to be handled as a server configuration parameter rather than embedded in application SQL. Which two actions meet these requirements? Select TWO.

Correct Answer: A. Set `archive_mode` to `on` and configure `archive_command` to invoke the tested command that archives completed WAL segments.; E. Set `edb_audit_filename` in the server configuration to the required audit-log destination or filename pattern, following the installed EDB audit facility's supported value format.
Explanation:

WAL archiving requires archiving to be enabled and a functioning `archive_command` that handles each completed WAL segment; setting `archive_mode` alone does not move segments to external storage. The command must return success only when the segment is safely archived so PostgreSQL can manage its retention correctly. `edb_audit_filename` is an EDB audit configuration setting used to control the audit log filename or destination according to the installed facility's accepted format. Application SQL or a per-database setting is not the appropriate mechanism. Copying the live WAL directory is not a substitute for PostgreSQL's archive process.

Question 4

New Single answer

Topic: Monitoring and administration tools

Skill tested: Uses PostgreSQL statistics views to identify sessions holding locks during service degradation.

After a deployment, an application's requests begin waiting while CPU and storage utilization remain normal. The PostgreSQL server accepts connections, but several transactions are stalled and the operations team suspects lock contention. They want to diagnose the current session relationships using built-in PostgreSQL monitoring data before terminating anything; collecting a full server log bundle is not yet justified. Which action is the best first step?

Correct Answer: B. Query `pg_stat_activity` and `pg_locks`, using `pg_blocking_pids(pid)` to identify blocked sessions and their blockers.
Explanation:

`pg_stat_activity` exposes current backend and transaction activity, while `pg_locks` reports lock state. PostgreSQL's `pg_blocking_pids(pid)` function can identify processes blocking a particular backend, allowing the team to inspect the blocker's query and transaction before deciding on remediation. `pg_isready` checks connection acceptance, not lock relationships. `pg_controldata` reports cluster control information rather than live session locks. Restarting would disrupt service and erase the evidence needed to identify the underlying transaction.

Question 5

New Multiple answers

Topic: Backup and recovery

Skill tested: Plans a physical base backup and WAL archive for point-in-time recovery to a specified timestamp.

A payment platform must recover a PostgreSQL 13 database to a point just before an accidental deletion discovered several hours later. The organization can accept recovery time measured in hours, but it needs recovery to arbitrary times within the retention window. It already has a tested mechanism for retaining archived WAL files off-host; current protection consists only of nightly SQL dumps. Which two changes provide the required physical point-in-time recovery capability? Select TWO.

Correct Answer: C. Take a consistent physical base backup using a supported PostgreSQL backup method, such as `pg_basebackup`, and retain it with the required backup metadata.; E. Enable WAL archiving with a reliable `archive_command` and retain the archived WAL needed from the base backup through the target recovery time.
Explanation:

Point-in-time recovery uses a physical base backup as the starting state and replays a continuous sequence of WAL records from that backup to the selected recovery target. A supported physical backup method produces a usable base backup, while WAL archiving preserves the changes needed to advance it. Logical dumps provide database-level restore points but do not supply continuous physical WAL replay to an arbitrary timestamp. An uncoordinated copy of a live data directory is not a reliable backup, and retaining only one recent WAL segment breaks the required sequence.

Question 6

New Single answer

Topic: Moving data and migration

Skill tested: Chooses logical replication for a low-downtime migration with a final controlled cutover.

A subscription business must move selected tables from a PostgreSQL 13 source to a separately managed PostgreSQL 13 target. The target uses a different storage layout, the source must remain writable during most of the migration, and the team can schedule a brief final cutover. It does not need to copy cluster-wide roles or configuration, and it can ensure that the selected tables have suitable primary keys for update and delete replication. Which migration approach best fits these constraints?

Correct Answer: D. Use logical replication to copy the initial table data and stream subsequent changes, then stop writes and perform a controlled final cutover.
Explanation:

Logical replication can publish selected tables, copy their initial contents, and apply ongoing changes on a separately managed target. That supports a low-downtime migration when the source remains writable, followed by a controlled write freeze and cutover. The stated primary-key condition supports replication of updates and deletes. `pg_upgrade` upgrades a cluster's major version rather than moving selected data between independent servers. A one-time dump misses writes made afterward, and copying a live data directory is neither a valid logical migration nor a safe way to accommodate a different storage layout.

Question 7

New Multiple answers

Topic: PostgreSQL database architecture

Skill tested: Applies database and schema isolation boundaries while accounting for shared cluster-level resources.

A hosting team serves two internal departments from one PostgreSQL cluster. Each department needs a distinct set of database objects, but the administrators deliberately want shared server configuration and a common maintenance lifecycle. They also understand that a database-level connection boundary does not provide independent operating-system or server-process isolation. The application teams do not require cross-database SQL queries. Which two design statements are accurate? Select TWO.

Correct Answer: C. Separate databases provide distinct database namespaces within the cluster, while continuing to share the server instance and its cluster-level configuration.; D. Schemas within one database can organize objects into separate namespaces, but do not create separate databases or independent server instances.
Explanation:

Databases in a PostgreSQL cluster have separate database-level object namespaces but are managed by the same server instance and share cluster-level resources such as configuration and WAL. Schemas add namespaces inside an individual database; they are useful for organizing objects but do not provide separate database or server isolation. Independent configuration files, WAL locations, and server lifecycles require separate clusters, not merely separate databases. Neither databases nor schemas within one cluster have their own independent WAL stream, and `pg_upgrade` operates at the cluster level.

Question 8

New Single answer

Topic: Installation and upgrading

Skill tested: Chooses dump-and-restore when moving databases between incompatible major-version environments.

A team is upgrading an older PostgreSQL deployment to version 13 while also changing operating systems and processor architecture. The source installation cannot be placed beside the target binaries, and the team's compatibility review indicates that a direct `pg_upgrade` path is unavailable. The database is modest in size, and the maintenance window permits a full outage. The team also needs to recreate cluster-level roles and settings, then validate the restored database before reopening access. What is the most appropriate approach?

Correct Answer: B. Use logical dump and restore, including cluster-level globals with an appropriate dump procedure, and validate the restored target before cutover.
Explanation:

Logical dump and restore is the suitable path when the source and target environments cannot use `pg_upgrade`, including cases involving incompatible platforms. A database dump can be restored into the PostgreSQL 13 target, while cluster-level roles and other global objects require a globals dump such as `pg_dumpall --globals-only` and corresponding restore steps. The outage and database size make this practical. A physical data-directory copy or physical backup cannot be assumed portable across incompatible builds, and `pg_upgrade` does not eliminate its platform and binary compatibility requirements.

Question 9

New Single answer

Topic: Configuration and maintenance

Skill tested: Changes PostgreSQL memory settings safely by accounting for their per-operation allocation behavior.

A database administrator reviews a PostgreSQL 13 configuration after a performance test. The workload runs several concurrent reporting queries, each of which may perform multiple sorts or hash operations. The proposed change is to increase `work_mem` substantially because individual test queries became faster. The server also handles many application sessions, and memory exhaustion would be more damaging than occasional temporary-file use. What is the best configuration response?

Correct Answer: D. Increase `work_mem` only after estimating concurrency and per-query memory use; consider a targeted session or role setting for reporting instead of a large global value.
Explanation:

`work_mem` is a limit available to individual sort or hash operations, not a single allocation shared by the whole server. A query can have multiple such operations, and many sessions can run concurrently, so a large global value can multiply memory consumption and risk exhaustion. Estimating concurrency and applying a larger value selectively to reporting sessions or roles is safer than an indiscriminate global increase. `shared_buffers` serves a different purpose, while disabling temporary-file use does not provide a safe substitute for sizing memory.

Question 10

New Multiple answers

Topic: Monitoring and administration tools

Skill tested: Collects targeted PostgreSQL diagnostics and interprets readiness checks without treating them as health analysis.

A PostgreSQL 13 application intermittently reports connection failures, although its monitoring dashboard shows the host is reachable. The on-call engineer needs to distinguish whether PostgreSQL is accepting connections, determine whether connection slots or database-level issues are involved, and preserve useful evidence before making changes. No specific failure has yet been reproduced. Which two actions provide the most useful immediate diagnostic information? Select TWO.

Correct Answer: B. Inspect relevant server logs and query `pg_stat_activity` alongside connection-limit settings to understand active sessions and capacity.; C. Use `pg_isready` to check whether the server responds as accepting, rejecting, or not responding to connection attempts.
Explanation:

`pg_isready` is a focused readiness check: it reports whether the server is accepting connections, rejecting them, or not responding, but it does not validate application credentials, database access, or query health. Server logs can reveal authentication, startup, and capacity errors; `pg_stat_activity` and connection settings help determine whether sessions are consuming available slots. Combining these checks gives useful evidence before remediation. `pg_upgrade --check` concerns upgrade prerequisites, not connection exhaustion, and manually deleting WAL files can corrupt recovery and remove critical diagnostic evidence.

Question 11

New Single answer

Topic: Backup and recovery

Skill tested: Identifies the correct recovery inputs and target configuration for restoring a physical backup to a time.

A team has a valid physical base backup and a continuous archived WAL sequence covering the incident window. It must build a separate recovery server and stop replay immediately before a transaction that corrupted business data. The recovery target must not overwrite the production cluster, and the team wants PostgreSQL to retrieve archived segments during startup recovery. Which recovery plan is appropriate?

Correct Answer: A. Restore the base backup to a separate data directory, configure `restore_command` to retrieve archived WAL, and set the appropriate recovery target before starting the server in recovery.
Explanation:

Physical point-in-time recovery starts from a physical base backup in a separate data directory, uses `restore_command` to supply archived WAL during recovery, and specifies a recovery target such as a timestamp or transaction boundary. PostgreSQL replays WAL until it reaches that target, allowing the team to inspect the recovered server without replacing production. `archive_command` sends completed WAL out to an archive; it is not the recovery fetch command. A logical SQL dump is not a physical WAL-replay base, and manual WAL copying into a running server does not initiate recovery.