Re: WIP: System Versioned Temporal Table - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: WIP: System Versioned Temporal Table
Date
Msg-id CANbhV-HuP7Du7GNJP8FFe8BD8RutuwWSTN5fahkEavBgkZUVaw@mail.gmail.com
Whole thread Raw
In response to Re: WIP: System Versioned Temporal Table  (Surafel Temesgen <surafel3000@gmail.com>)
List pgsql-hackers
On Fri, Jan 15, 2021 at 4:46 PM Surafel Temesgen <surafel3000@gmail.com> wrote:
>
>
>
> On Fri, Jan 15, 2021 at 12:27 AM Simon Riggs <simon.riggs@enterprisedb.com> wrote:
>>
>>
>> Yes, I think it can. The current situation is that the Start or End is
>> set to the Transaction Start Timestamp.
>> So if t2 starts before t1, then if t1 creates a row and t2 deletes it
>> then we will have start=t1 end=t2, but t2<t1
>> Your tests don't show that because it must happen concurrently.
>> We need to add an isolation test to show this, or to prove it doesn't happen.
>>
>
>
> Does MVCC allow that? i am not expert on MVCC but i don't
> think t2 can see the row create by translation started before
> itself

Yeh. Read Committed mode can see anything committed prior to the start
of the current statement, but UPDATEs always update the latest version
even if they can't see it.

Anyway, isolationtester spec file needed to test this. See
src/test/isolation and examples in specs/ directory

-- 
Simon Riggs                http://www.EnterpriseDB.com/



pgsql-hackers by date:

Previous
From: Surafel Temesgen
Date:
Subject: Re: WIP: System Versioned Temporal Table
Next
From: Surafel Temesgen
Date:
Subject: Re: WIP: System Versioned Temporal Table