Transactions and Isolation
Learn about transactions and isolation in PostgreSQL.
We'll cover the following
Given the ACID properties, a transaction must be isolated from other concurrent transactions running in the system. It’s possible to choose the level of isolation from the concurrent activity, depending on your use case.
Transaction isolation
A simple use case for isolation is online backups. The backup application for PostgreSQL is pg_dump
, and the role of this application is to take a snapshot of your whole database and export it to a backup file. This requires that pg_dump
reads are completely isolated from any concurrent write activity in the system, and this is obtained with the isolation level repeatable read or serializable as described next.
Get hands-on with 1400+ tech skills courses.