Final assessment · advanced · ~90 min · pass ≥ 80%
PostgreSQL for Production Sysadmins — Final Theory Assessment
Objectives
Reason about a PostgreSQL failure from evidence rather than from the symptom that was reported
Distinguish a control from a preference, and a measurement from a configuration
Predict what a PostgreSQL 18 cluster does in situations where the intuitive answer is wrong
Choose a remedy whose blast radius and rollback you can state before applying it
Identify the monitoring gap that made a given incident invisible
40 graded questions · last verified 2026-08-28
Assessment questions
Objective questions are scored automatically. Scenario answers use a second-stage rubric for evidence, remediation, and rollback.
Knowledge check · 40 questions
Q1. A cluster PANICs with "could not write to file pg_wal/xlogtemp.61: No space left on device". pg_wal holds 1.4 GB against a max_wal_size of 1 GB, with 88 files marked .ready. What does that combination indicate?
Q2. During that incident, two suggestions are made in the channel: delete the oldest files in pg_wal, and set fsync = off so the cluster starts. What is the correct characterisation of these?
Q3. VACUUM FREEZE runs for four hours on a large table, exits zero, and its VERBOSE output contains no "new relfrozenxid" line. What has happened?
Q4. A nightly report runs 60 queries inside one transaction over six hours, reading only a reporting schema. Autovacuum on unrelated OLTP tables reports "0 removed" with millions "not yet removable". Why are tables the report never touches affected?
Q5. An engineer runs VACUUM FULL on a 74 MB table during business hours. Every query on that table stops for eleven minutes, and services that never touch it also time out. The rewrite itself takes 159 ms. What accounts for the eleven minutes?
Q6. work_mem is raised from 4 MB to 256 MB cluster-wide to stop reporting queries spilling to disk. The reports get slower and a backend is later killed with signal 9. What is the most complete explanation?
Q7. The OOM killer terminates one backend on a busy cluster. What is the effect on the other sessions?
Q8. Which of these is NOT what raises the risk of an out-of-memory kill on a PostgreSQL host?
Q9. A batch job fails four nights running with "password authentication failed". The password is rotated three times and each rotation is verified with psql on the database host, successfully. What is the most likely situation?
Q10. An audit finds cleartext PostgreSQL traffic to one replica. TLS was enabled estate-wide eight months ago and signed off. No application has errored. What is the most probable cause?
Q11. Which sslmode value both encrypts the connection and establishes that the server is the one you meant to reach?
Q12. A cluster refuses a connection with "remaining connection slots are reserved for roles with the SUPERUSER attribute". What does that specific message tell you?
Q13. A four-second storage stall is followed by two hours of high latency, with storage healthy from minute one, CPU saturated in user time and iowait under 2 percent. Connections rose from 90 to 465 in thirty seconds. What is happening?
Q14. A replication lag alert fires most Sunday mornings and is always found to be a false alarm. It was eventually muted, and a genuine four-hour lag on a Tuesday went unnoticed. What is wrong with the metric?
Q15. A standby has been disconnected for six weeks and the lag dashboard has shown a flat zero throughout. What is the most likely reason the graph looked healthy?
Q16. A standby is rebooted for a kernel patch and every write on the primary stops. The primary is up, answering reads, and logs no error. What is the configuration, and what are the waiting backends doing?
Q17. Immediately after a successful pg_promote(), pg_controldata reports "Latest checkpoint TimeLineID: 1". What should the operator conclude?
Q18. Two clusters have both been accepting writes for fifty minutes after a partition. Which statement is correct?
Q19. A recovery is configured from the team template. It reaches its recovery target, immediately ends recovery, selects a new timeline and becomes writable - and only then does anyone see that the target was an hour late. Reaching a different target now costs a fresh restore of the base backup. Which single line in that template made the mistake expensive?
Q20. A recovery fails with "recovery ended before configured recovery target was reached". What are the two possible causes?
Q21. A CREATE INDEX CONCURRENTLY is cancelled mid-build. Write latency rises 30 percent and stays there, while no query plan changes. What was left behind?
Q22. Identical byte-level corruption is written into one page of a table on two clusters, one with data checksums and one without. What is the difference in behaviour?
Q23. A cluster shows "checkpoints are occurring too frequently" and write latency spikes every ninety seconds, with each checkpoint logged as "checkpoint starting: wal". What is the fix?
Q24. pg_upgrade --check fails with "old cluster does not use data checksums but the new one does". Which resolution is preferable and why?
Q25. Which of these can hold the vacuum freeze horizon and prevent relfrozenxid from advancing? Select all that apply.
Q26. Transaction-mode connection pooling breaks features scoped to a session. Which of these are affected? Select all that apply.
Q27. Which of these are true of a pg_dump of a single database? Select all that apply.
Q28. A plain VACUUM returns disk space to the filesystem when it removes dead tuples.
Q29. A cancelled VACUUM retains the progress it had made, so the next run resumes from where it stopped.
Q30. SELECT pg_reload_conf() returning true confirms that the new configuration was accepted.
Q31. pg_stat_user_tables.last_autovacuum records the time at which the most recent autovacuum on that table finished.
Q32. Setting synchronous_standby_names to name a single standby increases the availability of the cluster.
Q33. Cancelling a backend that is waiting at IPC / SyncRep returns an error to the client, so no partially replicated transaction is reported as successful.
Q34. Data checksums are verified whenever a page is read, including when it is read from shared buffers.
Q35. A physical base backup can be restored into a cluster running a different PostgreSQL major version.
Q36. A vacuum ran for hours and its VERBOSE output contains no "new relfrozenxid" line. Name the three categories of thing that could be responsible, and the one query that finds all of them.
Q37. Explain why testing a database credential with psql on the database host frequently proves nothing, and state what a valid test requires.
Q38. Diagnose and remediate this incident. State the evidence you would gather, the remediation, and what you would roll back if the remediation were wrong.
A primary has been slow since 02:00. Disk usage on the data
volume grew 40 GB overnight and recovered partially by
morning. Autovacuum has run hundreds of times across the
night and its log lines report "tuples: 0 removed" with
millions "dead but not yet removable". The affected tables
include several the nightly analytics job has never read. An
engineer has already raised autovacuum_max_workers from 3 to
8 and lowered the scale factors, which increased the number
of runs and changed nothing else. The problem stops when the
analytics job finishes at 04:00.
Q39. A failover has gone wrong. State the evidence you would gather, the remediation, and the rollback.
A network partition at 02:40 isolated the primary from the
monitoring network but not from the application network. The
failover automation promoted the standby at 02:42 after
failing to reach the primary. It is now 03:30. Both clusters
answer pg_is_in_recovery() with false. Customers report
orders that have disappeared and orders that were never
confirmed. Reporting totals from the two servers disagree by
a hundred and twenty orders. Neither server has logged
anything unusual.
Q40. A backup capability has failed silently. State the evidence, the remediation, and the rollback.
A production database must be restored after a mistaken
migration. The nightly logical backup job has reported
success every night for eleven months. The restore of last
night's dump completes and the application starts, but every
table is empty. The job's log shows "restore failed" was
never printed. The script contains: pg_dump ... | tee
backup.log, followed by a check on $?.
Passing score: 80%. Answers are checked in this browser.
How this assessment is weighted
Every question comes from a failure that this course reproduced and
measured. That is deliberate: an operator is judged by what they do when
the obvious answer is wrong, and roughly half of these questions are
cases where it is.
The distribution follows the operational surface rather than the
curriculum:
Area
Weight
Durability, WAL, backup and recovery
30%
MVCC, vacuum, locking and bloat
25%
Replication, failover and HA
20%
Memory, connections and performance
15%
Security, corruption and upgrades
10%
What a passing answer looks like
The scenario questions are marked on three things and the third is the
one most often missing: the evidence you would gather before acting,
the remediation, and what you would undo if the remediation turned out to
be wrong.
What this assessment does not test
It does not test SQL, schema design, query authoring or ORM behaviour.
Those are a developer’s competencies and this is not a developer’s
course.
It also does not test recall of default values. Where a default matters
it is stated in the question, because an operator reads
pg_settings.boot_val rather than remembering it — and because the
defaults that matter most have changed between recent versions.