Re: [PATCH] Docs: Make notes on sequences and rollback more obvious - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: [PATCH] Docs: Make notes on sequences and rollback more obvious
Date
Msg-id 502F539D.8050807@ringerc.id.au
Whole thread Raw
In response to Re: [PATCH] Docs: Make notes on sequences and rollback more obvious  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: [PATCH] Docs: Make notes on sequences and rollback more obvious
List pgsql-hackers
On 08/07/2012 09:45 PM, Kevin Grittner wrote:
> I also think it's a problem that one can get through the entire
> "Concurrency Control" chapter (mvcc.sgml) without a clue that
> sequences aren't transactional.  I think maybe a mention in the
> Introduction section of that chapter with a <ref> would be
> appropriate.

How about this? Is it accurate to suggest that sequences behave as if 
they were always in "dirty read" isolation? Or would you instead say 
that "changes made to a sequence are immediately visible to all other 
transactions" ?



[PATCH] Make sure you can't read through mvcc.sgml without realising
that SEQUENCEs and SERIAL don't follow the rules.

--- doc/src/sgml/mvcc.sgml | 11 +++++++++++ 1 file changed, 11 insertions(+)

diff --git a/doc/src/sgml/mvcc.sgml b/doc/src/sgml/mvcc.sgml
new file mode 100644
index 8f88582..eed1f85
*** a/doc/src/sgml/mvcc.sgml
--- b/doc/src/sgml/mvcc.sgml
***************
*** 260,265 ****
--- 260,276 ----      command <xref linkend="sql-set-transaction">.     </para>

+    <important>
+      <para>
+        Some PostgreSQL data types and functions have special transactional
+        behaviour. Notably, SEQUENCEs
+        behave as if the isolation level is Dirty Read, irrespective
+        of the current isolation level, and are exempt from transaction
+        rollback. See <xref linkend="functions-sequence">.
+        SEQUENCEs are used by the SERIAL data types. See <xref 
linkend="datatype-serial">.
+      </para>
+    </important>
+    <sect2 id="xact-read-committed">     <title>Read Committed Isolation Level</title>

-- 
1.7.11.2


--
Craig Ringer



pgsql-hackers by date:

Previous
From: Amit kapila
Date:
Subject: Re: New WAL code dumps core trivially on replay of bad data
Next
From: Craig Ringer
Date:
Subject: Re: [PATCH] Docs: Make notes on sequences and rollback more obvious