Re: In-place updates and serializable transactions

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: In-place updates and serializable transactions
Дата
Msg-id CACjxUsO0W0ZapmFRUs9AyJ-pE9P7k2B-oFs4Q1dwgkApPL_UYg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: In-place updates and serializable transactions  (Kuntal Ghosh <kuntalghosh.2007@gmail.com>)
Ответы Re: In-place updates and serializable transactions  (Amit Kapila <amit.kapila16@gmail.com>)
Re: In-place updates and serializable transactions  (Kuntal Ghosh <kuntalghosh.2007@gmail.com>)
Список pgsql-hackers
On Thu, Nov 15, 2018 at 3:03 AM Kuntal Ghosh <kuntalghosh.2007@gmail.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).

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!

-- 
Kevin Grittner
VMware vCenter Server
https://www.vmware.com/


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: A small tweak to some comments for PartitionKeyData
Следующее
От: Justin Pryzby
Дата:
Сообщение: pg11.1 jit segv