A customer says “the database is down.” In five minutes, how do you separate a broken connection path, connection saturation, wrong-node routing, lock waits, and a query-specific failure—and what do you communicate before you know root cause?
The database is down is a report, not a diagnosis, and this question is really about how quickly you can convert one into the other without breaking anything. Interviewers use it because it exposes two habits at once. The first is whether you test the path the customer is actually using or the one that is convenient for you. The second is whether you can read connection state accurately, because the most common wrong turn here is counting every server process as a client and declaring saturation that does not exist. The communication half is scored just as hard: panels want to hear what you would say while you still do not know. This page covers ordering the checks and the update that goes out first.
What the interviewer is scoring
Weak answer: counts every PostgreSQL process as a client connection, treats “waiting” as a session state, or fails over because one pool or one query is stuck.
In short: Test the path the customer actually uses, then bound the blast radius. A successful trivial transaction proves only that tested path and transaction; it does not prove that the workload is healthy.
The spoken answer and the reasoning behind it
- The full 90-second answer, written first person, the way you would actually say it
- How I reason through it: the mechanism, the decision points, and where the claim stops
- Verification steps with a written summary of what a controlled lab run showed, labelled as a summary rather than a transcript.
- Worked responses to the 3 follow-up probes listed above, plus the traps that lose the point
Card required. Cancel before day 7 and you are not charged.
How to reason through it
- Reproduce from the application network with the application endpoint, role, database, TLS mode, and a timed trivial transaction.
- On a reachable server, count only backend_type='client backend' by state; do not mix autovacuum, WAL sender, background writer, or other backend types into client capacity.
- Inspect wait_event_type and wait_event separately from state; compare ordinary-role capacity with max_connections - reserved_connections - superuser_reserved_connections.
- Corroborate saturation with failed-connection evidence and the pool’s queue depth, checkout latency, timeouts, and configured limit; identify lock blockers with pg_blocking_pids(pid) and pg_locks.
- Use pg_is_in_recovery() only to identify recovery state, not to declare health; split the blast radius by pool/direct path, read/write path, tenant, zone, and region.
- Communicate observed symptom, confirmed impact, current blast radius, the next discriminating check, unsafe actions being withheld, and the next update time.
What I would verify
- Time a connection and a trivial transaction from the application network, not from the database host.
- Group client backends by state, and read wait events as a separate dimension rather than as a state.
- Compare usable capacity for an ordinary role against the ceiling minus both reserved classes.
- Confirm a lock theory with the blocking-PID relationship before cancelling anything.
- Split impact by pooled versus direct, read versus write, tenant, and zone before calling it total.
Follow-ups they push on
- You connect fine as an admin. Is the database healthy?
- The pool is at its limit and the server is not. What do you do?
- What do you tell the customer at minute four?
The probes are open. Pro carries the spoken answer, the reasoning behind it, and the verification steps, including a worked response to each of these.
Concepts tested
Learn it, run it, then say it
Three steps, in order. Nothing here is a detour.
1 · Learn the mechanism
Understand it before you try to say it.
2 · Practise it for real
Run it once so the answer describes something you have seen.
3 · Rehearse the next question
Keep going while the mechanism is fresh.
Questions that go with this one
- senior · ProA query became slow after a deploy. Show a safe production triage that separates estimate error, execution or I/O cost, lock waits, and a cleanup horizon. Then explain what VACUUM can reclaim, how freezing protects availability, and how you would prove physical bloat.The next question down: once you know it is one query, how do you triage it safely?
- senior · ProWhen you propose a new observability signal, how do you justify it, why that metric, and what does it cost to collect?Where your signals either earn their keep or waste the only minutes you have.
- staff · ProStart with the highest-severity issue you've personally owned, the one that pushed your limits.The live version of the same skill, where the story you will tell later is actually created.
- senior · ProA fintech tenant must never read or write another tenant’s rows. Show the effective-role threat model across GRANT, RLS, table ownership, referential integrity, and SECURITY DEFINER functions.Where tenant boundaries reappear as blast radius under time pressure.