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

From Simon Riggs
Subject Re: WIP: System Versioned Temporal Table
Date
Msg-id CANbhV-HceeO5=L8euquJNh5hR-vY5_TSRj9mLyjOHZsLURWhYg@mail.gmail.com
Whole thread Raw
In response to Re: WIP: System Versioned Temporal Table  (Surafel Temesgen <surafel3000@gmail.com>)
Responses Re: WIP: System Versioned Temporal Table  (Surafel Temesgen <surafel3000@gmail.com>)
List pgsql-hackers
On Thu, Jan 14, 2021 at 5:42 PM Surafel Temesgen <surafel3000@gmail.com> wrote:
>
> Hi Simon,
> Thank you for all the work you does

No problem.

> On Mon, Jan 11, 2021 at 5:02 PM Simon Riggs <simon.riggs@enterprisedb.com> wrote:
>>
>>
>>
>> * Anomalies around use of CURRENT_TIMESTAMP are not discussed or resolved.
>> Probably need to add a test that end_timestamp > start_timestamp or ERROR,
>> which effectively enforces serializability.
>>
>
>
> This scenario doesn't happen.

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.

> There are no possibility of a record being deleted or updated before inserting

Agreed, but that was not the point.

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



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: WIP: System Versioned Temporal Table
Next
From: Tom Lane
Date:
Subject: Re: pg_preadv() and pg_pwritev()