Re: [PATCH] Docs: Make notes on sequences and rollback more obvious

From: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Docs: Make notes on sequences and rollback more obvious
Date: 2012-08-18 08:34:37
Message-ID: 502F539D.8050807@ringerc.id.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2012-08-18 08:37:01 Re: [PATCH] Docs: Make notes on sequences and rollback more obvious
Previous Message Amit kapila 2012-08-18 05:52:01 Re: New WAL code dumps core trivially on replay of bad data