Re: WIP: System Versioned Temporal Table

From: Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com>
To: Surafel Temesgen <surafel3000(at)gmail(dot)com>, Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com>, Vik Fearing <vik(at)postgresfriends(dot)org>, Rémi Lapeyre <remi(dot)lapeyre(at)lenstra(dot)fr>
Cc: Ryan Lambert <ryan(at)rustprooflabs(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Eli Marmor <eli(at)netmask(dot)it>, David Steele <david(at)pgmasters(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Georgios <gkokolatos(at)protonmail(dot)com>, Li Japin <japinli(at)hotmail(dot)com>
Subject: Re: WIP: System Versioned Temporal Table
Date: 2021-03-08 17:33:24
Message-ID: CALtqXTeMemTWNUQfa9_M+p=eOcvw5yLyfRReBu2BrAbo8rkYNw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 25, 2021 at 3:28 PM Li Japin <japinli(at)hotmail(dot)com> wrote:

>
> On Jan 27, 2021, at 12:39 AM, Surafel Temesgen <surafel3000(at)gmail(dot)com>
> wrote:
>
>
>
> On Tue, Jan 26, 2021 at 2:33 PM Vik Fearing <vik(at)postgresfriends(dot)org>
> wrote:
>
>> I'm still in the weeds of reviewing this patch, but why should this
>> fail? It should not fail.
>>
>
> Attached is rebased patch that include isolation test
>
>
> Thanks for updating the patch. However it cannot apply to master
> (e5d8a9990).
>
> Here are some comments on system-versioning-temporal-table_2021_v13.patch.
>
> +</programlisting>
> + When system versioning is specified two columns are added which
> + record the start timestamp and end timestamp of each row verson.
>
> verson -> version
>
> + By default, the column names will be StartTime and EndTime, though
> + you can specify different names if you choose.
>
> In fact, it is start_time and end_time, not StartTime and EndTime.
> I think it's better to use <literal> label around start_time and end_time.
>
> + column will be automatically added to the Primary Key of the
> + table.
>
> Should we mention the unique constraints?
>
> + The system versioning period end column will be added to the
> + Primary Key of the table as a way of ensuring that concurrent
> + INSERTs conflict correctly.
>
> Same as above.
>
> Since the get_row_start_time_col_name() and get_row_end_time_col_name()
> are similar, IMO we can pass a flag to get StartTime/EndTime column name,
> thought?
>
> --
> Regrads,
> Japin Li.
> ChengDu WenWu Information Technology Co.,Ltd.
>
> The patch (system-versioning-temporal-table_2021_v13.patch) does not apply
successfully.

http://cfbot.cputube.org/patch_32_2316.log

Hunk #1 FAILED at 80.
1 out of 1 hunk FAILED -- saving rejects to file
src/test/regress/parallel_schedule.rej
patching file src/test/regress/serial_schedule
Hunk #1 succeeded at 126 (offset -1 lines).

Therefore it is a minor change so I rebased the patch, please take a look
at that.

--
Ibrar Ahmed

Attachment Content-Type Size
system-versioning-temporal-table_2021_v14.patch application/octet-stream 116.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2021-03-08 18:06:32 Re: cryptohash: missing locking functions for OpenSSL <= 1.0.2?
Previous Message Tom Lane 2021-03-08 17:30:52 Re: Re: [PATCH] regexp_positions ( string text, pattern text, flags text ) → setof int4range[]