1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-21 05:21:08 +03:00

Implement isolation levels read uncommitted and repeatable read as acting

like the next higher one.
This commit is contained in:
Peter Eisentraut
2003-11-06 22:08:15 +00:00
parent 144a2ecd57
commit 96889392e9
15 changed files with 156 additions and 69 deletions

View File

@@ -1,4 +1,4 @@
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/set_transaction.sgml,v 1.17 2003/09/11 21:42:20 momjian Exp $ -->
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/set_transaction.sgml,v 1.18 2003/11/06 22:08:14 petere Exp $ -->
<refentry id="SQL-SET-TRANSACTION">
<refmeta>
<refentrytitle id="SQL-SET-TRANSACTION-TITLE">SET TRANSACTION</refentrytitle>
@@ -17,9 +17,12 @@
<refsynopsisdiv>
<synopsis>
SET TRANSACTION
[ ISOLATION LEVEL { READ COMMITTED | SERIALIZABLE } ] [ READ WRITE | READ ONLY ]
[ ISOLATION LEVEL { READ UNCOMMITTED | READ COMMITTED | REPEATABLE READ | SERIALIZABLE } ]
[ READ WRITE | READ ONLY ]
SET SESSION CHARACTERISTICS AS TRANSACTION
[ ISOLATION LEVEL { READ COMMITTED | SERIALIZABLE } ] [ READ WRITE | READ ONLY ]
[ ISOLATION LEVEL { READ UNCOMMITTED | READ COMMITTED | REPEATABLE READ | SERIALIZABLE } ]
[ READ WRITE | READ ONLY ]
</synopsis>
</refsynopsisdiv>
@@ -76,8 +79,11 @@ SET SESSION CHARACTERISTICS AS TRANSACTION
</varlistentry>
</variablelist>
The transaction isolation level cannot be set after the first query
or data-modification statement (<command>SELECT</command>,
The level <literal>READ UNCOMMITTED</literal> is mapped to
<literal>READ COMMITTED</literal>, the level <literal>REPEATABLE
READ</literal> is mapped to <literal>SERIALIZABLE</literal>, The
transaction isolation level cannot be set after the first query or
data-modification statement (<command>SELECT</command>,
<command>INSERT</command>, <command>DELETE</command>,
<command>UPDATE</command>, <command>FETCH</command>,
<command>COPY</command>) of a transaction has been executed. See
@@ -122,13 +128,12 @@ SET default_transaction_isolation = '<replaceable>value</replaceable>'
<para>
Both commands are defined in the <acronym>SQL</acronym> standard.
<literal>SERIALIZABLE</literal> is the default transaction
isolation level in the standard; in <productname>PostgreSQL</productname> the default is
ordinarily <literal>READ COMMITTED</literal>, but you can change it as
described above. <productname>PostgreSQL</productname> does not
provide the isolation levels <literal>READ UNCOMMITTED</literal>
and <literal>REPEATABLE READ</literal>. Because of multiversion
concurrency control, the <literal>SERIALIZABLE</literal> level is
not truly serializable. See <xref linkend="mvcc"> for details.
isolation level in the standard; in
<productname>PostgreSQL</productname> the default is ordinarily
<literal>READ COMMITTED</literal>, but you can change it as
described above. Because of multiversion concurrency control, the
<literal>SERIALIZABLE</literal> level is not truly
serializable. See <xref linkend="mvcc"> for details.
</para>
<para>

View File

@@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/start_transaction.sgml,v 1.7 2003/09/09 18:28:53 tgl Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/start_transaction.sgml,v 1.8 2003/11/06 22:08:14 petere Exp $
PostgreSQL documentation
-->
@@ -20,7 +20,9 @@ PostgreSQL documentation
<refsynopsisdiv>
<synopsis>
START TRANSACTION [ ISOLATION LEVEL { READ COMMITTED | SERIALIZABLE } ] [ READ WRITE | READ ONLY ]
START TRANSACTION
[ ISOLATION LEVEL { READ UNCOMMITTED | READ COMMITTED | REPEATABLE READ | SERIALIZABLE } ]
[ READ WRITE | READ ONLY ]
</synopsis>
</refsynopsisdiv>