Re: WIP: System Versioned Temporal Table

From: Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com>
To: Surafel Temesgen <surafel3000(at)gmail(dot)com>
Cc: Ryan Lambert <ryan(at)rustprooflabs(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Rémi Lapeyre <remi(dot)lapeyre(at)lenstra(dot)fr>, Eli Marmor <eli(at)netmask(dot)it>, David Steele <david(at)pgmasters(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Georgios <gkokolatos(at)protonmail(dot)com>, Vik Fearing <vik(dot)fearing(at)enterprisedb(dot)com>
Subject: Re: WIP: System Versioned Temporal Table
Date: 2021-01-15 16:50:24
Message-ID: CANbhV-HuP7Du7GNJP8FFe8BD8RutuwWSTN5fahkEavBgkZUVaw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 15, 2021 at 4:46 PM Surafel Temesgen <surafel3000(at)gmail(dot)com> wrote:
>
>
>
> On Fri, Jan 15, 2021 at 12:27 AM Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)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/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Surafel Temesgen 2021-01-15 16:56:42 Re: WIP: System Versioned Temporal Table
Previous Message Surafel Temesgen 2021-01-15 16:46:16 Re: WIP: System Versioned Temporal Table