From: | Craig Ringer <ringerc(at)ringerc(dot)id(dot)au> |
---|---|
To: | Nicolas Barbier <nicolas(dot)barbier(at)gmail(dot)com> |
Cc: | Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [PATCH] Docs: Make notes on sequences and rollback more obvious |
Date: | 2012-08-18 11:36:19 |
Message-ID: | 502F7E33.9050408@ringerc.id.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 08/18/2012 05:19 PM, Nicolas Barbier wrote:
> 2012/8/7 Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>:
>
>> 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.
>
> It is possible to say that they *are* transactional when considering
> the following definition: nextval() doesn’t always give you “the” next
> value, but “some” next value that is higher than the one gotten by any
> preceding transactions.
>
> I personally like it better to introduce this minor complexity in the
> definition of sequences, rather than messing with the definition of
> transactionality.
I guess they're semi-transactional. You don't get dirty reads unless you
actually `SELECT ... FROM some_transaction` which isn't really official
API. OTOH, one transaction affects another, and they aren't subject to
rollbacks.
--
Craig Ringer
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Korotkov | 2012-08-18 14:10:50 | Re: SP-GiST for ranges based on 2d-mapping and quad-tree |
Previous Message | Nicolas Barbier | 2012-08-18 09:19:54 | Re: [PATCH] Docs: Make notes on sequences and rollback more obvious |