Understanding ACID in PostgresSQL

Author      Ter-Petrosyan Hakob

In PostgreSQL (and other databases), ACID is a set of properties that ensure each transaction is safe, reliable, and correct. ACID stands for:

Let’s look at what each of these means in PostgreSQL.

Atomicity

Atomicity means that a transaction is treated as one complete unit. It either succeeds entirely or fails completely.

Consistency

Consistency ensures that the database remains valid after any transaction. PostgreSQL helps enforce consistency through:

Constraints

Rules that ensure the correctness of data:

Triggers

Foreign Key Relationships

Isolation

Isolation makes sure that transactions running at the same time don’t interfere with each other.

Durability

Durability means that once a transaction is committed, its changes are saved permanently, even if the system crashes.


Explore More