Skip to content
Tech Atlas, home
Search
Esc
  • All roadmapsBrowse every learning path
  • ExploreFind a technology area
  • ProjectsGuided projects and builds
  • My AtlasYour learning dashboard
Skill

Transactions & Isolation

Group changes into atomic transactions and choose isolation levels and locking so that concurrent reads and writes stay correct.

Intermediate2 roadmaps

4 objectives 6 steps about 130 min

Learn it step by step

Read the lessons in order, try the practice checks, then prove the skill with the knowledge check.

Start learning

This skill page is a public outline. Its lessons and knowledge check appear here as subject-matter experts approve them.

Learning objectives

  • Explain atomicity, consistency, isolation and durability, and use BEGIN, COMMIT, ROLLBACK and savepoints to make multi-statement changes atomic.
  • Reproduce non-repeatable reads, phantoms, lost updates and write skew, and state which PostgreSQL isolation level prevents each one.
  • Prevent lost updates with row locks (SELECT ... FOR UPDATE), optimistic version checks, or SERIALIZABLE with retry on serialization failure.
  • Diagnose lock waits and deadlocks with pg_stat_activity and pg_locks, and restructure transactions to avoid them.

Lesson plan

6 steps, about 130 min · 5 of 5 lessons available so far

Practise it

Write a script that runs two concurrent money-transfer workers against PostgreSQL; demonstrate a lost update under READ COMMITTED, fix it twice (row locks, then SERIALIZABLE with retry) and show that total balance is unchanged after 1,000 concurrent transfers.

Build it from scratch

Practice builds that exercise this skill by re-creating a real technology.

Browse 4 tutorials that practise it

References

Hard prerequisites

Unlocks

Nothing depends on this skill yet.

On these roadmaps

Progress and evidence for this skill are shared across all of them.