The PostgreSQL administration field guideField notes · Runbooks · Free certification

Section 3 of 3 · 7 minutes

Act, verify, and hand over

Your goal

What you will be able to do

Choose the smallest safe response, verify the user outcome, and record remaining risk and ownership.

Why this matters at work

The practical reason

A symptom can briefly improve while the cause, data risk, or follow-up work remains.

Learn

The idea in plain English

State the expected effect, rollback route, and approval before changing anything. Prefer the smallest action that tests or removes the confirmed cause.

After the action, repeat the original user check and the diagnostic measurement. Record what changed, what did not, remaining risk, and the named owner and time for each follow-up.

Remember these points

  • Connect the action to a confirmed cause.
  • Repeat the original user and database checks afterwards.
  • A handover needs remaining risk, owner, and next review time.

See it in SQL

Record the state of a target session before cancellation

Collect ownership and transaction impact before a disruptive session action.

SELECT
  pid,
  usename,
  application_name,
  client_addr,
  state,
  now() - xact_start AS transaction_age,
  now() - query_start AS query_age,
  wait_event_type,
  wait_event
FROM pg_stat_activity
WHERE pid = 4242;

Replace the training PID with the confirmed target. Contact the owner and understand rollback work before cancellation or termination.

After action, verify queue recovery and the affected application path rather than relying on the session disappearing.

What you should see

One target session's owner, client, transaction and query age, state, and current wait.

Useful words

Important terms

Handover
A concise record of impact, evidence, actions, results, remaining risk, and next owners.

Quick check · Not graded

Check your understanding

What proves an incident action worked?

Choose one answer

Your progress is saved to your signed-in account.