From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Kevin Grittner <kgrittn(at)gmail(dot)com> |
Cc: | Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com>, joshua(dot)yanovski(at)gmail(dot)com, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, hlinnaka <hlinnaka(at)iki(dot)fi>, Jeff Davis <pgsql(at)j-davis(dot)com>, joe(dot)conway(at)crunchydata(dot)com |
Subject: | Re: In-place updates and serializable transactions |
Date: | 2018-11-19 06:01:06 |
Message-ID: | CAA4eK1JOWxb2Tn0vcBmRMH45Bicg14zUJfxf=K-VRrUyhpRfiw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Nov 16, 2018 at 4:07 AM Kevin Grittner <kgrittn(at)gmail(dot)com> wrote:
>
> On Thu, Nov 15, 2018 at 3:03 AM Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com> wrote:
>
> > The test multiple-row-versions is failing because of the
> > above-discussed scenario. I've attached the regression diff file and
> > the result output file for the same. Here is a brief summary of the
> > test w.r.t. heap:
> >
> > Step 1: T1-> BEGIN; Read FROM t where id=1000000;
> > Step 2: T2-> BEGIN; UPDATE t where id=1000000; COMMIT; (creates T1->T2)
> > Step 3: T3-> BEGIN; UPDATE t where id=1000000; Read FROM t where id=500000;
> > Step 4: T4-> BEGIN; UPDATE t where id= 500000; Read FROM t where id=1;
> > COMMIT; (creates T3->T4)
> > Step 5: T3-> COMMIT;
> > Step 6: T1-> UPDATE t where id=1; COMMIT; (creates T4->T1,)
> >
> > At step 6, when the update statement is executed, T1 is rolled back
> > because of T3->T4->T1.
> >
> > But for zheap, step 3 also creates a dependency T1->T3 because of
> > in-place update. When T4 commits in step 4, it marks T3 as doomed
> > because of T1 --> T3 --> T4. Hence, in step 5, T3 is rolled back.
>
> If I understand this, no permutation (order of execution of the
> statements in a set of concurrent transactions vulnerable to
> serialization anomalies) which have succeeded with the old storage
> engine now fail with zheap; what we have with zheap is an earlier
> failure in one case. More importantly, zheap doesn't create any false
> negatives (cases where a serialization anomaly is missed).
>
Your understanding is correct. Thanks for sharing your feedback.
> I would say this should be considered a resounding success. We should
> probably add an alternative result file to cover this case, but
> otherwise I don't see anything which requires action.
>
> Congratulations on making this work so well!
>
Thanks.
--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Kuntal Ghosh | 2018-11-19 06:15:23 | Re: In-place updates and serializable transactions |
Previous Message | Andrey Lepikhov | 2018-11-19 05:48:06 | Re: [PATCH] XLogReadRecord returns pointer to currently read page |