Movatterモバイル変換


[0]ホーム

URL:



Facebook
Postgres Pro
Facebook
Downloads
13.1. Introduction
Prev UpChapter 13. Concurrency ControlHome Next

13.1. Introduction

PostgreSQL provides a rich set of tools for developers to manage concurrent access to data. Internally, data consistency is maintained by using a multiversion model (Multiversion Concurrency Control,MVCC). This means that each SQL statement sees a snapshot of data (adatabase version) as it was some time ago, regardless of the current state of the underlying data. This prevents statements from viewing inconsistent data produced by concurrent transactions performing updates on the same data rows, providingtransaction isolation for each database session.MVCC, by eschewing the locking methodologies of traditional database systems, minimizes lock contention in order to allow for reasonable performance in multiuser environments.

The main advantage of using theMVCC model of concurrency control rather than locking is that inMVCC locks acquired for querying (reading) data do not conflict with locks acquired for writing data, and so reading never blocks writing and writing never blocks reading.PostgreSQL maintains this guarantee even when providing the strictest level of transaction isolation through the use of an innovativeSerializable Snapshot Isolation (SSI) level.

Table- and row-level locking facilities are also available inPostgreSQL for applications which don't generally need full transaction isolation and prefer to explicitly manage particular points of conflict. However, proper use ofMVCC will generally provide better performance than locks. In addition, application-defined advisory locks provide a mechanism for acquiring locks that are not tied to a single transaction.


Prev Up Next
Chapter 13. Concurrency Control Home 13.2. Transaction Isolation
epubpdf
Go to PostgreSQL 9.6
By continuing to browse this website, you agree to the use of cookies. Go toPrivacy Policy.

[8]ページ先頭

©2009-2025 Movatter.jp