🎁 New User? Get 20% off your first purchase with code NEWUSER20 Register Now →
Menu

Categories

Databases Advanced

What is MVCC (Multi-Version Concurrency Control)?

A technique where the database maintains multiple versions of data to allow concurrent reads and writes without locking.

MVCC enables high concurrency by letting readers see a consistent snapshot of data without blocking writers. When a row is updated, the database creates a new version rather than overwriting the old one. Readers see the version that was current when their transaction started. PostgreSQL implements MVCC by storing version information (xmin/xmax transaction IDs) with each tuple. This eliminates read-write contention but requires periodic VACUUM to reclaim space from obsolete row versions. MVCC is why PostgreSQL can handle many concurrent users efficiently.

Related Terms

Time-Series Database
A database optimized for storing and querying timestamped data points like metrics, sensor readings, and event logs.
Row-Level Security (RLS)
A database feature that restricts which rows a user can access in a table based on security policies.
PostgreSQL
An advanced open-source relational database known for its reliability, feature richness, and standards compliance.
Trigger
A database object that automatically executes a specified function when certain events (INSERT, UPDATE, DELETE) occur on a table.
Partitioning
A technique of dividing large database tables into smaller, more manageable segments while maintaining a single logical table.
Database Connection Pooling
A technique that maintains a cache of database connections for reuse, reducing the overhead of creating new connections.
View All Databases Terms →