Limited-Time Offer: Enjoy 50% Savings! - Ends In 0d 00h 00m 00s Coupon code: 50OFF
Welcome to QA4Exam

Free practice questions with explanations

EnterpriseDB PostgreSQL-Essentials Dumps 2026 with Free Practice Questions and Answers

15 original PostgreSQL Essentials Certification v13 exam practice questions with answers and explanations.

Covers Backup And Recovery Strategies, Configuration Parameters, Database Clusters, Database Maintenance and 5 more.

Question types: single answer, multiple answers, drag and drop, dropdown and order list. A new question is added every 15 days.

PostgreSQL-Essentials Practice Set Details

Exam Code
PostgreSQL-Essentials
Questions On This Page
15
Exam Topics Covered
9 of 10
Question Types
5
Newest Question
New Question
Every 15 days
Full Question Set
71
Certification
EnterpriseDB PostgreSQL Certifications
15 questions

EnterpriseDB PostgreSQL-Essentials Exam Questions and Answers by Topic

Backup and Recovery Strategies

2 practice questions on this topicWhat this topic covers

Question 1

Added

Single Answer

A payment service runs PostgreSQL 13 on a single primary. The business requires recovery to any point within the previous 72 hours, with no more than five minutes of lost transactions after a host failure. The team can tolerate a short initial backup window, but cannot rely on operators remembering to take daily snapshots. Which backup design best meets these requirements?

Correct answer: D

A base backup combined with continuous WAL archiving supports point-in-time recovery, and independent storage protects the recovery material from loss with the host. Monitoring archive completion helps detect gaps before a restore is needed. A nightly pg_dump provides logical backups but does not by itself provide continuous point-in-time recovery. Copying a live data directory without a supported backup procedure can produce an inconsistent copy. synchronous_commit controls commit durability, not backup retention or recovery to an earlier time.

Question 2

Added

Single Answer

A small team needs a portable backup of one database for transfer to a test environment running the same PostgreSQL major version. The backup must be restorable selectively by schema, and the team wants to inspect the archive contents before restoring. They do not require point-in-time recovery and cannot copy the production cluster's entire data directory. Which approach best fits?

Correct answer: D

The custom archive format from pg_dump is designed for selective restoration, and pg_restore -l lists its table of contents before restore. It fits a single-database transfer without copying the cluster. pg_basebackup creates a physical cluster backup rather than a selectively restorable logical archive. Files copied directly from a live data directory are not a supported logical backup and cannot be filtered by pg_restore. pg_dumpall emits SQL script output, not a pg_restore archive with the requested listing workflow.

Configuration Parameters

2 practice questions on this topicWhat this topic covers

Question 3

Added

Single Answer

A reporting workload has several concurrent queries that perform large sorts and hash joins. Temporary files are increasing, but the server has a fixed 32 GB of RAM and also serves latency-sensitive application sessions. Administrators want to reduce disk spills without risking memory exhaustion from multiplying a large allocation across all sessions and plan nodes. Which change is the best first adjustment?

Correct answer: C

work_mem is available per sort or hash operation, so a modest increase informed by concurrency can reduce spills without assuming every connection has a single allocation. Its aggregate use can exceed the setting substantially when many operations and sessions run at once. shared_buffers is a shared cache, not per-query sort memory. A 4 GB work_mem can multiply into unsafe RAM use and is not a prudent first adjustment. maintenance_work_mem primarily supports maintenance operations such as index creation and vacuum, rather than ordinary query sorts.

Question 4

Added

Single Answer

A PostgreSQL 13 administrator must change max_connections from 100 to 160 for a planned application rollout. The change is approved for the next maintenance restart, but the team wants the configuration file to remain the source of truth and wants to avoid an immediate outage. Which action is correct?

Correct answer: C

max_connections is a postmaster-start parameter, so changing its configured value requires a server restart; a configuration reload alone cannot apply it. Updating postgresql.conf preserves the designated configuration source, and the approved maintenance window avoids an unplanned outage. ALTER SYSTEM writes to postgresql.auto.conf and does not make a restart-only parameter take effect immediately. set_config cannot change this cluster-wide startup setting. ALTER DATABASE cannot override max_connections.

Creating and Managing Databases

1 practice question on this topicWhat this topic covers

Question 5

Added

Multiple Answers

A team is provisioning a separate database for a regional application. It must inherit the existing UTF-8 encoding and locale policy, use a non-superuser owner, and avoid allowing unrelated roles to connect by default. The source template database is known to be clean and has no application objects. Which two actions satisfy the requirements? (Choose two.)

Correct answer: A, E

template1 is the normal source for a new database and carries the cluster's established encoding and locale settings; specifying the intended role as owner avoids a later ownership correction. Revoking CONNECT from PUBLIC and granting it selectively implements the stated connection restriction. template0 is useful when creating a database with settings incompatible with template1, but that is not required here. Changing ownership after creation is possible but does not replace the required access control. Giving postgres ownership and CREATEDB to the application role violates the least-privilege and non-superuser ownership goals.

Database Clusters

2 practice questions on this topicWhat this topic covers

Question 6

Added

Order List

A PostgreSQL 13 team is building a physical standby on another host from a running primary. They need a streaming replication connection and want the standby to be initialized using PostgreSQL's supported base-backup utility. Arrange the operational steps in the order they must be performed.

Drag the steps into the correct order, or use the arrows.

  1. Run pg_basebackup with the replication connection to initialize the standby.
  2. Configure standby recovery connection settings and start PostgreSQL.
  3. Create a replication role and permit its connection in pg_hba.conf.
  4. Configure primary WAL and connection settings for replication.
Correct answer:
  1. Configure primary WAL and connection settings for replication.
  2. Create a replication role and permit its connection in pg_hba.conf.
  3. Run pg_basebackup with the replication connection to initialize the standby.
  4. Configure standby recovery connection settings and start PostgreSQL.

The primary must first be configured to generate and expose the WAL needed for replication, and the replication role must be able to authenticate from the standby host. pg_basebackup then obtains a consistent physical copy using the replication protocol. Only after initialization should the standby's connection and recovery configuration be set and the server started. Starting before the data directory is populated cannot produce a usable standby, while backing up before the primary permits replication access prevents the intended transfer.

Question 7

Added

Single Answer

A company uses PostgreSQL 13 physical streaming replication with one asynchronous standby for read-only analytics. During a network partition, the primary continues accepting writes, and management asks whether the standby can be promoted without risking divergent writable nodes. There is no external consensus or fencing service, and the team wants a safe operational response rather than automatic promotion. What should the operator do?

Correct answer: D

Streaming replication does not itself coordinate failover or prevent both servers from accepting writes. Confirming the old primary is stopped or fenced before promotion prevents two writable nodes from diverging. Immediate promotion while the old primary may still be serving writes risks split brain. synchronous_commit on the standby does not establish leadership or fence the primary. Disabling hot_standby is not a promotion mechanism and does not safely transfer primary responsibility.

Database Maintenance

2 practice questions on this topicWhat this topic covers

Question 8

Added

Single Answer

A large production table is accumulating dead tuples after frequent updates. Autovacuum is enabled, but monitoring shows that vacuum runs are delayed because the table's threshold is reached only after a large absolute number of changes. The team wants more frequent cleanup for this table without changing behavior across the whole cluster, and cannot take an exclusive maintenance window. What is the best action?

Correct answer: B

A table-level autovacuum_vacuum_scale_factor lowers the change-count component of the vacuum threshold for this table, addressing delayed cleanup without imposing a global policy. Monitoring confirms that the adjusted trigger produces useful runs. VACUUM FULL rewrites the table and requires an access-exclusive lock, so it conflicts with the no-window constraint. Disabling autovacuum risks transaction ID and bloat problems and makes maintenance disruptive. An index does not make autovacuum's dead-tuple threshold depend on the update timestamp.

Question 9

Added

Single Answer

A table has a B-tree index used by a continuously updated application. An administrator wants to remove index bloat, but application writes must continue and the team can accept extra CPU and I/O during the operation. The index is valid and is not corrupt. Which maintenance action best satisfies the availability constraint?

Correct answer: B

In PostgreSQL 13, REINDEX INDEX CONCURRENTLY rebuilds an index while allowing concurrent reads and writes, though it takes longer and uses additional resources. That matches the availability requirement for a valid index. Ordinary REINDEX takes a lock that blocks writes to the indexed table during the rebuild. VACUUM FULL rewrites the table under an access-exclusive lock and is not a nonblocking index rebuild. CLUSTER rewrites the table and also requires a strong lock, so it does not preserve concurrent writes.

Database Objects and Hierarchy

2 practice questions on this topicWhat this topic covers

Question 10

Added

Drag And Drop

A developer is reviewing object names in a database where the search_path contains app, shared, and public, in that order. Match each reference to the object PostgreSQL resolves it to, assuming each listed object exists and no quoting changes the spelling.

Drag each item onto its matching target. On a phone: tap an item, then tap a target.

shared.orders
Unqualified table name orders
app.customer_view
The orders relation in schema shared
The first matching relation in app, then shared, then public
The customer_view relation in schema app
Correct answer:
  • Unqualified table name orders → The first matching relation in app, then shared, then public
  • shared.orders → The orders relation in schema shared
  • app.customer_view → The customer_view relation in schema app

An unqualified relation name is resolved by searching schemas in search_path order, so the first matching object wins. A schema-qualified name bypasses that search order and identifies the relation in the named schema. The qualified references therefore resolve directly to shared.orders and app.customer_view. The search_path does not reorder explicitly qualified names, and PostgreSQL does not search every schema in the database when an unqualified name is absent from the configured path.

Question 11

Added

Single Answer

A reporting view joins customer and invoice tables. Analysts should be able to query the view but must not receive direct privileges on the underlying tables. The view owner has the required table permissions, and the team is using PostgreSQL's default view behavior rather than security-invoker views. Which grant is sufficient for analysts to query the view, assuming the database connection is already allowed?

Correct answer: D

With a conventional PostgreSQL view, access to the view is checked using the view owner's permissions for its underlying relations. Analysts therefore need schema USAGE to resolve the object and SELECT on the view, not direct SELECT on the base tables. Granting table privileges alone does not grant access to the view. Ownership of the view and tables is excessive and violates the stated separation. Schema CREATE is not needed to read an existing view.

Database Security

1 practice question on this topicWhat this topic covers

Question 12

Added

Multiple Answers

A finance database must allow a reporting role to read selected tables but not modify them. Access is granted through a group role, and new tables are created regularly by the finance owner. The organization prohibits granting superuser or database-owner privileges to reporting users. Which two measures provide the intended access for both current and future tables? (Choose two.)

Correct answer: A, E

Database CONNECT and schema USAGE are distinct prerequisites for reaching objects, while SELECT on existing tables supplies the required read permission. Default privileges can grant SELECT on future tables, but they are configured for objects subsequently created by a particular role, so the finance owner must configure them. Schema ALL PRIVILEGES does not grant table SELECT. Membership in the database-owner role violates the stated privilege boundary. PostgreSQL default privileges are not a database-wide rule independent of the creating role.

Disaster Recovery

1 practice question on this topicWhat this topic covers

Question 13

Added

Dropdown

After restoring a PostgreSQL 13 base backup to a replacement host, an administrator must recover to a known timestamp and then keep the restored instance from accepting writes as a primary. Complete the recovery configuration with the required settings.

Choose the correct value for each blank.

recovery_target_time = ''
recovery_target_action = ''
Correct answer:

recovery_target_time = '2025-10-27 09:30:00+00'
recovery_target_action = 'pause'

A timestamp value for recovery_target_time directs recovery to the requested point in the archived WAL timeline. Setting recovery_target_action to pause stops recovery at the target and leaves the server in recovery, rather than promoting it to a writable primary. immediate and latest are not timestamp values for the specified target. promote deliberately ends recovery by promoting the instance. shutdown exits the server at the target instead of leaving it paused for inspection.

Fundamental SQL

2 practice questions on this topicWhat this topic covers

Question 14

Added

Single Answer

An inventory report must list every product, including products with no sales, and show each product's total quantity sold. The sales table can contain multiple rows per product, and products with no matching sales should display zero rather than NULL. Which query best meets the requirement?

Correct answer: C

A LEFT JOIN preserves every product even when no sale matches, and SUM returns NULL for the unmatched group; COALESCE converts that result to zero. The product key is grouped so multiple sale rows contribute to one total. An inner JOIN omits products without sales. A RIGHT JOIN preserves sale rows rather than all products. Selecting an unaggregated quantity while grouping only by product is invalid SQL and would not calculate a total.

Question 15

Added

Single Answer

A service stores events with columns account_id, occurred_at, and event_type. For each account, an analyst needs only the most recent event whose type is 'login', with ties at the same timestamp allowed to return multiple rows. The query must not first discard accounts that have no login event, because those accounts are not part of the requested result. Which query is the most direct correct choice?

Correct answer: D

PostgreSQL DISTINCT ON keeps the first row per account, and the ordering makes that row the latest login for each account. Because the ordering does not add a unique tie-breaker, equal timestamps can leave tied rows eligible, consistent with the stated tie allowance. Grouping by event_type does not identify the row containing the maximum timestamp. LIMIT 1 returns only one event overall. The uncorrelated subquery in the final query compares every account against the global maximum event time, not its own latest login.

More Practice Questions

Get the Full EnterpriseDB PostgreSQL-Essentials Dumps as PDF and Practice Test

15 questions are free on this page and the full set has 71. It comes as a PDF and an online practice test, with 90 days of free updates.