Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
mvcc-caveats.html34 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.6. Caveats</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-serialization-failure-handling.html" title="13.5. Serialization Failure Handling" /><link rel="next" href="locking-indexes.html" title="13.7. Locking and Indexes" /></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.6. Caveats</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="mvcc-serialization-failure-handling.html" title="13.5. Serialization Failure Handling">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="locking-indexes.html" title="13.7. Locking and Indexes">Next</a></td></tr></table><hr /></div><div class="sect1" id="MVCC-CAVEATS"><div class="titlepage"><div><div><h2 class="title" style="clear: both">13.6. Caveats <a href="#MVCC-CAVEATS" class="id_link">#</a></h2></div></div></div><p>3    Some DDL commands, currently only <a class="link" href="sql-truncate.html" title="TRUNCATE"><code class="command">TRUNCATE</code></a> and the4    table-rewriting forms of <a class="link" href="sql-altertable.html" title="ALTER TABLE"><code class="command">ALTER TABLE</code></a>, are not5    MVCC-safe.  This means that after the truncation or rewrite commits, the6    table will appear empty to concurrent transactions, if they are using a7    snapshot taken before the DDL command committed.  This will only be an8    issue for a transaction that did not access the table in question9    before the DDL command started — any transaction that has done so10    would hold at least an <code class="literal">ACCESS SHARE</code> table lock,11    which would block the DDL command until that transaction completes.12    So these commands will not cause any apparent inconsistency in the13    table contents for successive queries on the target table, but they14    could cause visible inconsistency between the contents of the target15    table and other tables in the database.16   </p><p>17    Support for the Serializable transaction isolation level has not yet18    been added to hot standby replication targets (described in19    <a class="xref" href="hot-standby.html" title="27.4. Hot Standby">Section 27.4</a>).  The strictest isolation level currently20    supported in hot standby mode is Repeatable Read.  While performing all21    permanent database writes within Serializable transactions on the22    primary will ensure that all standbys will eventually reach a consistent23    state, a Repeatable Read transaction run on the standby can sometimes24    see a transient state that is inconsistent with any serial execution25    of the transactions on the primary.26   </p><p>27    Internal access to the system catalogs is not done using the isolation28    level of the current transaction.  This means that newly created database29    objects such as tables are visible to concurrent Repeatable Read and30    Serializable transactions, even though the rows they contain are not.  In31    contrast, queries that explicitly examine the system catalogs don't see32    rows representing concurrently created database objects, in the higher33    isolation levels.34   </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="mvcc-serialization-failure-handling.html" title="13.5. Serialization Failure Handling">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="locking-indexes.html" title="13.7. Locking and Indexes">Next</a></td></tr><tr><td width="40%" align="left" valign="top">13.5. Serialization Failure Handling </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.7. Locking and Indexes</td></tr></table></div></body></html>
codekingpro/portable-devtools · Team Ai