Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 0cadec7

Browse files
committed
Correct erroneous description of MVCC Read Committed semantics.
1 parent f155cc8 commit 0cadec7

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

doc/src/sgml/mvcc.sgml

+17-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.11 2000/12/22 21:51:58 petere Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.12 2001/03/28 20:46:34 tgl Exp $
33
-->
44

55
<chapter id="mvcc">
@@ -95,7 +95,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.11 2000/12/22 21:51:58 petere
9595
The four isolation levels and the corresponding behaviors are described below.
9696

9797
<table tocentry="1">
98-
<title><productname>Postgres</productname> Isolation Levels</title>
98+
<title><acronym>ANSI</acronym>/<acronym>ISO</acronym> <acronym>SQL</acronym> Isolation Levels</title>
9999
<titleabbrev>Isolation Levels</titleabbrev>
100100
<tgroup cols="4">
101101
<thead>
@@ -192,10 +192,13 @@ $Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.11 2000/12/22 21:51:58 petere
192192
is the default isolation level in <productname>Postgres</productname>.
193193
When a transaction runs on this isolation level,
194194
a <command>SELECT</command> query sees only data committed before the
195-
transaction began and never sees either dirty data or concurrent
196-
transaction changes committed during transaction execution. (However, the
195+
query began and never sees either uncommitted data or changes committed
196+
during query execution by concurrent transactions. (However, the
197197
<command>SELECT</command> does see the effects of previous updates
198-
executed within this same transaction.)
198+
executed within this same transaction, even though they are not yet
199+
committed.) Notice that two successive <command>SELECT</command>s can see different data,
200+
even though they are within a single transaction, when other transactions
201+
commit changes during execution of the first <command>SELECT</command>.
199202
</para>
200203

201204
<para>
@@ -241,11 +244,15 @@ $Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.11 2000/12/22 21:51:58 petere
241244
<para>
242245
When a transaction is on the serializable level,
243246
a <command>SELECT</command> query sees only data committed before the
244-
transaction began and never sees either dirty data or concurrent
245-
transaction changes committed during transaction execution. (However, the
247+
transaction began and never sees either uncommitted data or changes
248+
committed
249+
during transaction execution by concurrent transactions. (However, the
246250
<command>SELECT</command> does see the effects of previous updates
247-
executed within this same transaction.) This is the same behavior as
248-
for Read Committed level.
251+
executed within this same transaction, even though they are not yet
252+
committed.) This is different from Read Committed in that the
253+
<command>SELECT</command>
254+
sees a snapshot as of the start of the transaction, not as of the start
255+
of the current query within the transaction.
249256
</para>
250257

251258
<para>
@@ -286,7 +293,7 @@ ERROR: Can't serialize access due to concurrent update
286293
updates make it impossible to sustain the illusion of serial execution,
287294
and the cost of redoing complex transactions may be significant. So
288295
this level is recommended only when update queries contain logic
289-
sufficiently complex that it may give wrong answers in Read Committed
296+
sufficiently complex that they may give wrong answers in Read Committed
290297
level.
291298
</para>
292299
</sect1>

0 commit comments

Comments
 (0)