While most other database systems use locks to maintain concurrency control and data consistency, PostgreSQL uses a multi-version model. Think of a version as a data snapshot at a distinct point in time. When users query a table, the current version of the data appears. If they run the same query again on the table, a new version appears if any data has changed. Data changes occur in a database through UPDATE, INSERT, or DELETE statements.
A simple example of selecting data from one table shows the difference between traditional row-level locking and PostgreSQL's MVCC.
SELECT headlines FROM news_items
.
.
.
In PostgreSQL, however, users can always view the news_items table. There is no need to wait for a lock to be released, even if multiple users are inserting and updating data in the table. When a user issues the SELECT query, PostgreSQL displays a snapshot, or version, of all the data that was committed before the query began. Any data updates or inserts that are part of open transactions or were committed after the query began will not be displayed. Doesn't that make complete sense?