What Are ACID Properties? The Practical Meaning of Atomicity, Consistency, Isolation, and Durability
ACID is an acronym for four properties of database transactions: atomicity, consistency, isolation, and durability. Together, they help treat related changes as one reliable operation, but a database cannot automatically enforce business rules that have never been defined. In a PostgreSQL account transfer, for example, the related changes must commit or roll back together, valid balance rules must be expressed, concurrent work must be controlled, and a confirmed commit must survive failures.
What does each letter mean?
| Property | Plain-language meaning | What to check in a transfer |
|---|---|---|
| Atomicity | All transaction changes take effect, or none do. | Prevents a debit from remaining without the matching credit. |
| Consistency | A transaction finishes in a state that satisfies the database’s declared constraints and rules. | A constraint can forbid negative balances, but the database does not guess business rules on its own. |
| Isolation | Controls how concurrent transactions see or conflict with each other’s intermediate work. | Prevents simultaneous transfers from making unsafe decisions based on the same balance; the exact guarantee depends on isolation level. |
| Durability | A commit reported as successful should remain recorded after a failure. | A completed transfer should not disappear after an immediate restart; check storage settings and the failure scope they cover. |
How do the four properties work together in one transfer?
Assume account A has 500 and account B has 200, and A sends B 100. The intended result is A with 400 and B with 300. The database groups both account changes in one transaction.
BEGIN;
UPDATE accounts
SET balance = balance - 100.00
WHERE account_id = 'A' AND balance >= 100.00;
-- The application checks that the first UPDATE changed exactly one row.
UPDATE accounts
SET balance = balance + 100.00
WHERE account_id = 'B';
-- Commit only after checking the success conditions for both updates.
COMMIT;This SQL is illustrative and was not run. A real implementation must check that the recipient exists and verify the affected-row count of both updates; if either condition fails, it should run ROLLBACK. A database constraint such as CHECK (balance >= 0) can help prevent an individual balance from becoming negative. But a cross-row rule such as preserving the total across all accounts cannot be fully expressed by a simple row-level CHECK. Constraints, transaction logic, and the right concurrency control must work together to preserve consistency.
**Atomicity:** If an error occurs after the first update, cancel both changes. On success, commit them together.
**Consistency:** Allow only results that satisfy the rules you have actually defined. A transaction cannot invent a missing rule when the transfer code requests an invalid result.
**Isolation:** Other sessions cannot see the uncommitted intermediate state, but the outcome of concurrent reads and writes depends on the isolation level.
**Durability:** After a successful commit, normal durability settings allow the database to recover the committed changes after a failure. Backups provide a separate way to recover from accidental deletion or incorrect updates.
Does consistency happen automatically?
No. A database can check declared constraints such as uniqueness, foreign keys, NOT NULL, and some CHECK conditions. If a business rule is not expressed in the schema or transaction procedure, the database cannot know that it must enforce it. Rules such as “one person may have only one active subscription” or “the total across all accounts must be conserved” need an implementation that accounts for their scope and concurrent access.
In PostgreSQL, the default READ COMMITTED level takes a new snapshot at the start of each SQL statement. If a read-decide-write sequence spans multiple statements and runs concurrently, each statement may succeed while the overall business rule is violated. Depending on the rule, use a uniqueness constraint, suitable row locks, or consider SERIALIZABLE and retry the whole transaction after a serialization failure. The right choice depends on the data model and concurrent request pattern.
Does a commit always guarantee durability?
Durability concerns the commit response and recovery after failure, but the practical guarantee depends on product settings and storage reliability. In PostgreSQL, ordinary synchronous commit behavior writes the WAL to durable storage before reporting success. With synchronous_commit set to off, a recent commit that was acknowledged may be lost if the server fails. Disabling fsync can create more serious recovery risks and should be limited to narrow situations such as temporary data that can easily be recreated.
Durability is not the same as a backup. Durability helps recover committed changes after a failure; backups help restore data after a mistaken deletion or update. So “the database is ACID” does not mean you can skip a recovery plan.
How can you check the four properties in practice?
**Atomicity:** Define which SQL statements make up one business change and confirm that error paths roll the whole group back.
**Consistency:** List the invariants that must always hold and encode suitable rules as database constraints where possible. Design separately for rules spanning multiple rows, tables, or concurrent requests.
**Isolation:** Find requests that can change the same data simultaneously and handle conflicts with a suitable isolation level, constraint, or lock. If using serializable transactions, design whole-transaction retries and safe re-execution.
**Durability:** Check the production database’s WAL and synchronization settings and the storage layer, and maintain a separate backup and recovery process. PostgreSQL settings can change the trade-off between performance and risk of loss after failure.
**Verification:** In a test environment, examine mid-operation failures, simultaneous requests, and a restart immediately after commit. The SQL example and failure scenarios in this article were not run.
Scope and sources
[PostgreSQL 18 glossary: ACID and atomicity](https://www.postgresql.org/docs/18/glossary.html)
[PostgreSQL 18 tutorial: Transactions](https://www.postgresql.org/docs/18/tutorial-transactions.html)
[PostgreSQL 18: Transaction Isolation](https://www.postgresql.org/docs/18/transaction-iso.html)
[PostgreSQL 18: Data Consistency Checks at the Application Level](https://www.postgresql.org/docs/18/applevel-consistency.html)
[PostgreSQL 18: Constraints](https://www.postgresql.org/docs/18/ddl-constraints.html)
[PostgreSQL 18: Non-Durable Settings](https://www.postgresql.org/docs/18/non-durability.html)
[PostgreSQL 18: Asynchronous Commit](https://www.postgresql.org/docs/18/wal-async-commit.html)
[PostgreSQL 18: Backup and Restore](https://www.postgresql.org/docs/18/backup.html)
The PostgreSQL 18 documentation was checked on 2026-11-22. ACID is a general model for database transactions; specific isolation, commit, and constraint behavior described here is scoped to PostgreSQL. The account values and SQL are illustrative assumptions and were not run. No configuration change or failure experiment is claimed.