Study guide · Core notes

PostgreSQL Certified Associate core notes

Reference notes for EDB Essentials for PostgreSQL v18. Each section names the object, and what you check in a cluster you are allowed to drop.

Reviewed November 20, 2026Ten study groupsEqual 10% editorial weights

How to read these notes: Unmarked items sit on the public Essentials outline or the PostgreSQL docs they point at. Items tagged Extra are job context that outline does not require. New to the exam? Start with the overview. Practice in a cluster you can remove. Official topic percentages are unpublished; weights below are editorial equals.

Architecture & Installation

10% editorial. Process model, memory, install.

Process model

A listener accepts connections and starts a backend per session. Shared memory holds caches such as shared_buffers. Background processes checkpoint and write dirty buffers.

WAL

Write-ahead logging records changes for crash recovery and, when archived, point-in-time recovery. Heap and index files hold relation data; WAL is the redo stream.

PGDATA

The data directory is the cluster on disk. Document its path for start/stop, backup, and restore. Fix OS ownership for the postgres user when installs fail on permissions.

Memory planning

Size shared_buffers and work_mem with host RAM and concurrency in mind. Oversized per-session work_mem can exhaust memory under load. Extra Exact defaults change by version and packaging.

Clusters & Configuration

10% editorial. initdb, GUCs, pg_hba.

Cluster versus database

One cluster (one PGDATA, one postmaster) can contain many databases. initdb creates the cluster; CREATE DATABASE adds a database inside it.

postgresql.conf

Most GUCs live here (and includes / ALTER SYSTEM → postgresql.auto.conf). Some settings reload; shared_buffers typically needs a restart.

pg_hba.conf

Host-based authentication: who may connect from where, to which database, with which method (for example scram-sha-256, reject, trust).

Templates

CREATE DATABASE copies a template (often template1). Keep template0 pristine when you customize template1.

User Tools & Data Dictionary

10% editorial. psql and catalogs.

psql

Interactive client for SQL and meta-commands: \\dt, \\d, \\c, \\timing. It is not a physical backup tool.

pg_catalog

Core system catalogs describing roles, relations, and types. Query carefully; prefer documented views when learning.

information_schema

SQL-standard metadata views for tables, columns, and privileges. Useful for portable introspection scripts.

pg_settings

Shows current GUC values, context, and pending_restart. Confirm whether a change needs reload or restart.

Creating & Managing Databases

10% editorial. Schemas, objects, tablespaces.

Schemas

Namespaces inside a database. Prefer an application schema over dumping everything into public; set search_path on roles or databases.

Ownership

Creators own objects unless reassigned. Ownership and GRANT privileges are related but not identical.

Tablespaces

Map selected objects to filesystem locations. CREATE/ALTER ... TABLESPACE places files; plan I/O and locks for moves.

Worked shape

CREATE SCHEMA app AUTHORIZATION app_owner; CREATE TABLE app.orders (id bigint PRIMARY KEY, status text NOT NULL);

Grant usage on schema and rights on tables to the login role the app uses.

Database Security

10% editorial. Roles, grants, auth.

Roles

CREATE ROLE ... LOGIN makes a user. Non-LOGIN roles work as groups. GRANT group TO user inherits privileges subject to INHERIT.

Least privilege

Application roles get only required statements on required objects. Avoid SUPERUSER and internet-facing trust auth.

Authentication

scram-sha-256 is the modern password method. trust skips passwords when a matching hba rule applies—limit it tightly.

Sequences

An INSERT calling nextval needs USAGE on the sequence and INSERT on the table. SELECT on the sequence is not required for nextval.

Monitoring & Admin Tools

10% editorial. Stats and sessions.

pg_stat_activity

Current sessions, states, waits, and queries. Use pg_terminate_backend on runaway PIDs after identification.

Relation stats

pg_stat_user_tables shows seq scans versus index scans and tuple counters that guide indexing and vacuum.

Connections

Watch counts against max_connections. Connection poolers often sit in front of busy apps.

Idle in transaction

Long idle-in-transaction sessions hold locks and snapshots. Investigate apps and idle_in_transaction_session_timeout. Extra Exact timeout defaults vary.

SQL Fundamentals

10% editorial. Queries and transactions.

Transactions

BEGIN / COMMIT / ROLLBACK. After an error, the transaction is aborted until ROLLBACK (or a savepoint rollback).

NULL

Comparisons with = NULL yield unknown. Use IS NULL. NOT IN with nullable subqueries can return no rows unexpectedly.

Joins

INNER JOIN keeps matches. LEFT JOIN keeps all left rows. Prefer LEFT JOIN when reports must include parents without children.

RETURNING

INSERT ... RETURNING fetches generated values in one round trip—handy for keys without a second SELECT.

Backup, Recovery & PITR

10% editorial. Logical and physical recovery.

pg_dump / pg_restore

Logical backups. Plain SQL via psql; custom/directory formats via pg_restore. Restore-test every important dump.

Base backup

Physical copy of PGDATA (often pg_basebackup) for restore. Combine with WAL for PITR.

WAL archive

Continuous archiving fills the gap between base backups. Missing segments break recovery to a target time.

HA is not undo

Promoting a standby keeps a replicated DROP. Delayed replicas or PITR undo bad changes.

Routine Maintenance & Moving Data

10% editorial. Vacuum and COPY.

VACUUM

Reclaims dead tuple space for reuse. VACUUM FULL rewrites and locks more heavily—use sparingly.

ANALYZE

Refreshes planner statistics. Stale stats cause poor plans.

Autovacuum

Background vacuum/analyze. If it falls behind, bloat and wraparound risk rise—tune or vacuum manually.

COPY

Bulk load/unload. Server COPY needs server filesystem rights; \\copy runs through the client. A failed default COPY FROM leaves no visible inserted rows, though dead rows can use disk until VACUUM.

Replication & High Availability

10% editorial. Streaming and failover.

Streaming replication

Standbys receive and replay WAL from a primary. Writes go to the primary; standbys are typically read-only.

Lag and RPO

Async standbys can lose recent transactions on failover if WAL was not shipped yet. Sync commit tightens RPO with latency cost.

Replication slots

Retain WAL until consumers catch up. Abandoned slots fill disks—monitor and drop stale ones.

Failover tooling

Patroni and similar stacks automate promote. Extra Essentials stresses concepts; know the idea even if your lab uses plain promote.

Worked cases: transactions, maintenance, and recoverability

These exercises use PostgreSQL 18 behavior to match this certification path. Run experiments in a disposable cluster and record the session, transaction boundary, and expected result. Software release announcements do not automatically change the version assessed by a certification.

Observe two sessions instead of guessing about isolation

Create a small account table and open two sessions. In the first, begin a transaction and read one row. In the second, update that row and commit. Under Read Committed, a later statement in the first transaction can see the newly committed value. A transaction does not necessarily use one unchanged snapshot merely because BEGIN was issued. Under Repeatable Read, the snapshot behavior differs; use a fresh transaction for the comparison.

For a stock decrement, avoid reading a quantity in the application and later writing a computed replacement without concurrency protection. A conditional update such as UPDATE stock SET quantity = quantity - 1 WHERE sku = 'LAB-1' AND quantity > 0 RETURNING quantity; expresses the check and modification together. Inspect whether it returned a row. No returned row means the operation did not meet its condition, not that an item was reserved successfully. Broader business invariants may require appropriate locking, constraints, or a transaction spanning additional work.

Recover an aborted transaction deliberately

Inside an explicit transaction, cause a constraint violation in your learning table, then try another statement. PostgreSQL normally leaves that transaction in an aborted state until it is rolled back. Sending more application queries without resolving the state will not repair it. A savepoint established before a risky operation can allow rollback to that point when the application intentionally handles the error. Decide whether partial continuation is valid for the business operation before using that pattern.

When a serializable transaction must be retried, retry the complete logical transaction with fresh reads rather than repeating only its final statement. Keep external effects such as emails outside a retryable transaction body. A database rollback cannot recall a message already sent to another system.

Explain what VACUUM and ANALYZE actually change

Repeated updates create old row versions. Ordinary VACUUM makes eligible space reusable and supports transaction-age maintenance; it generally does not shrink the table file back to its smallest possible size. ANALYZE refreshes planner statistics. These are related maintenance tasks with different purposes. A poor row estimate may suggest stale or inadequate statistics, while accumulating dead tuples calls for investigation of vacuum progress and what prevents cleanup.

Do not immediately use VACUUM FULL as a routine response to table growth. It rewrites the table and requires a strong lock, so its operational cost matters. In a lab, compare table size, estimated dead tuples, and query plans before and after maintenance. Check long-running transactions and replication-related retention when cleanup cannot advance. Increasing disk space without understanding retention may only postpone the same failure.

Prove recovery with a controlled target

A backup job reporting success is only one part of recoverability. For point-in-time recovery, plan a suitable physical base backup and the required continuous WAL history. A logical dump serves a different restoration workflow and is not a replacement base for physical WAL replay. Keep configuration, access details, and required extensions available so the restored service can actually operate.

In a disposable environment, create marker A, take the appropriate backup, create marker B, and then perform an intentionally unwanted change. Restore to an isolated destination and stop at a target before that change. Verify both wanted markers according to the chosen backup and target timeline, confirm the unwanted change is absent, and test application access. Record recovery time and the latest recoverable data point. This tests RTO and RPO assumptions instead of merely confirming that files exist.

Technical references: transaction isolation, routine vacuuming, and continuous archiving and recovery.

Verification drills

Eight short labs. Write down what you saw, not only that the command exited zero.

1. Init and login

Initialize a disposable cluster, start it, and connect with psql as the bootstrap role.

What to verify: PGDATA path, successful \\conninfo, and a SELECT current_database().

2. Reload versus restart

Change a reloadable GUC and a restart-required GUC; attempt reload after each.

What to verify: SHOW reflects the reloadable change; pending_restart or docs explain the other.

3. Role and hba

Create an app LOGIN role with scram-sha-256 and a matching pg_hba rule; connect from that role.

What to verify: Password auth works for the intended host rule and fails when you mis-match the rule.

4. Schema privileges

Create schema app, table app.t, grant SELECT only to a reader role.

What to verify: Reader can SELECT and cannot CREATE in the schema without CREATE privilege.

5. Aborted transaction

BEGIN; run a failing statement; try another SELECT; then ROLLBACK.

What to verify: The aborted-transaction error until ROLLBACK, then normal queries again.

6. Dump and restore

pg_dump a small database and restore into a new database name.

What to verify: Row counts match and a primary key still enforces uniqueness.

7. Vacuum after updates

UPDATE many rows, check dead tuple signals, VACUUM, recheck.

What to verify: Dead-tuple counters or bloat indicators move in the expected direction after vacuum.

8. Streaming standby

Create a standby from a base backup, watch replay lag, insert on primary.

What to verify: Lag metrics update and the insert appears on the standby after replay.

Frequently asked questions

Which exam do these notes follow?

These notes follow EDB Essentials for PostgreSQL v18 and the Essentials course outline topics. Official topic percentages are unpublished on the catalog page reviewed for this path; this site uses equal 10% editorial weights. This is not EDB Advanced for PostgreSQL and not EDB Postgres Essentials for Advanced Server.

What does pg_dump do?

pg_dump creates a logical backup of database contents as SQL or archive formats. Physical base backups and WAL archiving are separate tools used for point-in-time recovery.

How is streaming replication different from a backup?

Streaming replication keeps a standby replaying WAL for high availability or read scaling. Backups restore data after loss or corruption. A promoted standby still carries a replicated DROP TABLE; backups or a delayed replica are how you undo bad changes.

Why does VACUUM matter?

PostgreSQL’s MVCC leaves dead tuples after updates and deletes. VACUUM and autovacuum reclaim that space for reuse and help avoid transaction ID wraparound problems.

Continue the PostgreSQL study path

The overview, core notes, flashcards, and practice exams are all published.

PostgreSQL hub →
Available

Overview

Exam format, the ten study groups, and a lab plan.

Available · You are here

Core Notes

Reference notes for architecture through streaming replication.

Available

Practice Exams

200 original questions across the ten study groups.

PostgreSQL 19 release versus the v18 certification

PostgreSQL 19 was released on November 19, 2026. The EDB certification catalog checked on November 23 still lists Essentials for PostgreSQL v18, v16, and v14. This path continues to target v18; a database release does not automatically create a new certification version.

Use the PostgreSQL 18 documentation for exam-aligned labs. The unversioned current-documentation link now opens PostgreSQL 19. Its new REPACK command, WAIT FOR LSN support, and changes to logical-replication setup must not be assumed to exist in a v18 lab. Compare the official PostgreSQL 19 release announcement with the version-specific manual when exploring newer features.

Record the server version before reproducing an example. Keep certification preparation, production upgrades, and optional exploration of a newer release as separate decisions.

Official exam sources

These notes follow the EDB Certification Exams Catalog, the EDB Essentials for PostgreSQL data sheet, and PostgreSQL community documentation for technical behavior. Confirm version details on the EDB Training Portal before booking.

Apply concepts in the Scenario Workshop →