Re: Repeatable read and serializable transactions see data committed after tx start - Mailing list pgsql-hackers

From Álvaro Hernández Tortosa
Subject Re: Repeatable read and serializable transactions see data committed after tx start
Date
Msg-id 545ABB12.1050607@8Kdata.com
Whole thread Raw
In response to Re: Repeatable read and serializable transactions see data committed after tx start  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Responses Re: Repeatable read and serializable transactions see data committed after tx start  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
List pgsql-hackers
On 05/11/14 17:46, Jim Nasby wrote:
> On 11/4/14, 6:11 PM, Álvaro Hernández Tortosa wrote:
>>      Should we improve then the docs stating this more clearly? Any 
>> objection to do this?
>
> If we go that route we should also mention that now() will no longer 
> be doing what you probably hope it would (AFAIK it's driven by BEGIN 
> and not the first snapshot).
    If I understand you correctly, you mean that if we add a note to 
the documentation stating that the transaction really freezes when you 
do the first query, people would expect now() to be also frozen when the 
first query is done, which is not what happens (it's frozen at tx 
start). Then, yes, you're right, probably *both* the isolation levels 
and the now() function documentation should be patched to become more 
precise.

>
> Perhaps we should change how now() works, but I'm worried about what 
> that might do to existing applications...
    Perhaps, I also believe it might not be good for existing 
applications, but it definitely has a different freeze behavior, which 
seems inconsistent too.
    Thanks,
    Álvaro

-- 
Álvaro Hernández Tortosa


-----------
8Kdata




pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: WAL replay bugs
Next
From: Álvaro Hernández Tortosa
Date:
Subject: Re: Repeatable read and serializable transactions see data committed after tx start