From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Álvaro Hernández Tortosa <aht(at)8kdata(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Repeatable read and serializable transactions see data committed after tx start |
Date: | 2014-11-07 20:48:36 |
Message-ID: | CA+TgmoZAj2e0irM7DtrtKam751BVvLmJqi8=pSO=59R3-5WwEQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Nov 5, 2014 at 7:17 PM, Álvaro Hernández Tortosa <aht(at)8kdata(dot)com> wrote:
>>> Given a transaction started with "BEGIN.... (REPEATABLE READ |
>>> SERIALIZABLE)", if a concurrent session commits some data before *any*
>>> query
>>> within the first transaction, that committed data is seen by the
>>> transaction. This is not what I'd expect.
>>
>> I think the problem is with your expectation, not the behavior.
>
> But my expectation is derived from the documentation:
>
> "The Repeatable Read isolation level only sees data committed before the
> transaction began;"
Yes, that's inaccurate. We should fix it.
(But we should not change the behavior, because I'm pretty sure that
the villagers would show up with pitchforks when various
currently-harmless scenarios caused massive database bloat.)
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2014-11-07 20:52:04 | Re: B-Tree index builds, CLUSTER, and sortsupport |
Previous Message | Robert Haas | 2014-11-07 20:40:37 | Re: On partitioning |