Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
mvcc-intro.html37 linesDownload Raw Back to html
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>13.1. Introduction</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="prev" href="mvcc.html" title="Chapter 13. Concurrency Control" /><link rel="next" href="transaction-iso.html" title="13.2. Transaction Isolation" /></head><body id="docContent" class="container-fluid col-10"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">13.1. Introduction</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="mvcc.html" title="Chapter 13. Concurrency Control">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="mvcc.html" title="Chapter 13. Concurrency Control">Up</a></td><th width="60%" align="center">Chapter 13. Concurrency Control</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 16.3 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="transaction-iso.html" title="13.2. Transaction Isolation">Next</a></td></tr></table><hr /></div><div class="sect1" id="MVCC-INTRO"><div class="titlepage"><div><div><h2 class="title" style="clear: both">13.1. Introduction <a href="#MVCC-INTRO" class="id_link">#</a></h2></div></div></div><a id="id-1.5.12.4.2" class="indexterm"></a><a id="id-1.5.12.4.3" class="indexterm"></a><a id="id-1.5.12.4.4" class="indexterm"></a><a id="id-1.5.12.4.5" class="indexterm"></a><p>3    <span class="productname">PostgreSQL</span> provides a rich set of tools4    for developers to manage concurrent access to data.  Internally,5    data consistency is maintained by using a multiversion6    model (Multiversion Concurrency Control, <acronym class="acronym">MVCC</acronym>).7    This means that each SQL statement sees8    a snapshot of data (a <em class="firstterm">database version</em>)9    as it was some10    time ago, regardless of the current state of the underlying data.11    This prevents statements from viewing inconsistent data produced12    by concurrent transactions performing updates on the same13    data rows, providing <em class="firstterm">transaction isolation</em>14    for each database session.  <acronym class="acronym">MVCC</acronym>, by eschewing15    the locking methodologies of traditional database systems,16    minimizes lock contention in order to allow for reasonable17    performance in multiuser environments.18   </p><p>19    The main advantage of using the <acronym class="acronym">MVCC</acronym> model of20    concurrency control rather than locking is that in21    <acronym class="acronym">MVCC</acronym> locks acquired for querying (reading) data22    do not conflict with locks acquired for writing data, and so23    reading never blocks writing and writing never blocks reading.24    <span class="productname">PostgreSQL</span> maintains this guarantee25    even when providing the strictest level of transaction26    isolation through the use of an innovative <em class="firstterm">Serializable27    Snapshot Isolation</em> (<acronym class="acronym">SSI</acronym>) level.28   </p><p>29    Table- and row-level locking facilities are also available in30    <span class="productname">PostgreSQL</span> for applications which don't31    generally need full transaction isolation and prefer to explicitly32    manage particular points of conflict.  However, proper33    use of <acronym class="acronym">MVCC</acronym> will generally provide better34    performance than locks.  In addition, application-defined advisory35    locks provide a mechanism for acquiring locks that are not tied36    to a single transaction.37   </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="mvcc.html" title="Chapter 13. Concurrency Control">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="mvcc.html" title="Chapter 13. Concurrency Control">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="transaction-iso.html" title="13.2. Transaction Isolation">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 13. Concurrency Control </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 16.3 Documentation">Home</a></td><td width="40%" align="right" valign="top"> 13.2. Transaction Isolation</td></tr></table></div></body></html>
codekingpro/portable-devtools · Team Ai