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

Commit 1575fbf

Browse files
committed
Doc: Add references for SI and SSI.
Our documentation failed to point out that REPEATABLE READ is really snapshot isolation, which might be important to some users. Point to the standard reference paper for this complicated topic. Likewise, add a reference to the VLDB paper about PostgreSQL SSI, for technical information about our SSI implementation and how it compares to S2PL. While here, add a note about catalog access using a lower isolation level, per recent user complaint. Back-patch to all releases. Reported-by: Kyle Kingsbury <aphyr@jepsen.io> Reviewed-by: Andres Freund <andres@anarazel.de> Reviewed-by: Peter Geoghegan <pg@bowt.ie> Reviewed-by: Tatsuo Ishii <ishii@sraoss.co.jp> Discussion: https://postgr.es/m/db7b729d-0226-d162-a126-8a8ab2dc4443%40jepsen.io Discussion: https://postgr.es/m/16454-9408996bb1750faf%40postgresql.org
1 parent decbe2b commit 1575fbf

File tree

2 files changed

+91
-0
lines changed

2 files changed

+91
-0
lines changed

doc/src/sgml/biblio.sgml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,64 @@ ssimkovi@ag.or.at
230230
<bibliodiv>
231231
<title>Proceedings and Articles</title>
232232

233+
<biblioentry id="ports12">
234+
<biblioset relation="article">
235+
<title><ulink url="https://arxiv.org/pdf/1208.4179">Serializable Snapshot Isolation in PostgreSQL</ulink></title>
236+
<authorgroup>
237+
<author>
238+
<firstname>D.</firstname>
239+
<surname>Ports</surname>
240+
</author>
241+
<author>
242+
<firstname>K.</firstname>
243+
<surname>Grittner</surname>
244+
</author>
245+
</authorgroup>
246+
</biblioset>
247+
<confgroup>
248+
<conftitle>VLDB Conference</conftitle>
249+
<confdates>August 2012</confdates>
250+
<address>Istanbul, Turkey</address>
251+
</confgroup>
252+
</biblioentry>
253+
254+
<biblioentry id="berenson95">
255+
<biblioset relation="article">
256+
<title><ulink url="https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/tr-95-51.pdf">A Critique of ANSI SQL Isolation Levels</ulink></title>
257+
<authorgroup>
258+
<author>
259+
<firstname>H.</firstname>
260+
<surname>Berenson</surname>
261+
</author>
262+
<author>
263+
<firstname>P.</firstname>
264+
<surname>Bernstein</surname>
265+
</author>
266+
<author>
267+
<firstname>J.</firstname>
268+
<surname>Gray</surname>
269+
</author>
270+
<author>
271+
<firstname>J.</firstname>
272+
<surname>Melton</surname>
273+
</author>
274+
<author>
275+
<firstname>E.</firstname>
276+
<surname>O'Neil</surname>
277+
</author>
278+
<author>
279+
<firstname>P.</firstname>
280+
<surname>O'Neil</surname>
281+
</author>
282+
</authorgroup>
283+
</biblioset>
284+
<confgroup>
285+
<conftitle>ACM-SIGMOD Conference on Management of Data</conftitle>
286+
<confdates>June 1995</confdates>
287+
<address>San Jose, California</address>
288+
</confgroup>
289+
</biblioentry>
290+
233291
<biblioentry id="olson93">
234292
<title>Partial indexing in POSTGRES: research project</title>
235293
<authorgroup>

doc/src/sgml/mvcc.sgml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,20 @@ ERROR: could not serialize access due to concurrent update
535535
of explicit locks to block conflicting transactions.
536536
</para>
537537

538+
<para>
539+
The Repeatable Read isolation level is implemented using a technique
540+
known in academic database literature and in some other database products
541+
as <firstterm>Snapshot Isolation</firstterm>. Differences in behavior
542+
and performance may be observed when compared with systems that use a
543+
traditional locking technique that reduces concurrency. Some other
544+
systems may even offer Repeatable Read and Snapshot Isolation as distinct
545+
isolation levels with different behavior. The permitted phenomena that
546+
distinguish the two techniques were not formalized by database researchers
547+
until after the SQL standard was developed, and are outside the scope of
548+
this manual. For a full treatment, please see
549+
<xref linkend="berenson95"/>.
550+
</para>
551+
538552
<note>
539553
<para>
540554
Prior to <productname>PostgreSQL</productname> version 9.1, a request
@@ -783,6 +797,15 @@ ERROR: could not serialize access due to read/write dependencies among transact
783797
</listitem>
784798
</itemizedlist>
785799
</para>
800+
801+
<para>
802+
The Serializable isolation level is implemented using a technique known
803+
in academic database literature as Serializable Snapshot Isolation, which
804+
builds on Snapshot Isolation by adding checks for serialization anomalies.
805+
Some differences in behavior and performance may be observed when compared
806+
with other systems that use a traditional locking technique. Please see
807+
<xref linkend="ports12"/> for detailed information.
808+
</para>
786809
</sect2>
787810
</sect1>
788811

@@ -1726,6 +1749,16 @@ SELECT pg_advisory_lock(q.id) FROM
17261749
see a transient state that is inconsistent with any serial execution
17271750
of the transactions on the master.
17281751
</para>
1752+
1753+
<para>
1754+
Internal access to the system catalogs is not done using the isolation
1755+
level of the current transaction. This means that newly created database
1756+
objects such as tables are visible to concurrent Repeatable Read and
1757+
Serializable transactions, even though the rows they contain are not. In
1758+
contrast, queries that explicitly examine the system catalogs don't see
1759+
rows representing concurrently created database objects, in the higher
1760+
isolation levels.
1761+
</para>
17291762
</sect1>
17301763

17311764
<sect1 id="locking-indexes">

0 commit comments

Comments
 (0)