Re: Autonomous Transaction is back

Поиск
Список
Период
Сортировка
От Rajeev rastogi
Тема Re: Autonomous Transaction is back
Дата
Msg-id BF2827DCCE55594C8D7A8F7FFD3AB7715990922F@szxeml521-mbs.china.huawei.com
обсуждение исходный текст
Ответ на Re: Autonomous Transaction is back  (Craig Ringer <craig@2ndquadrant.com>)
Список pgsql-hackers
On 28 July 2015 15:31, Craig Ringer Wrote:


>> 2.            It should be allowed to deadlock with master transaction.
>We
>> need to work-out a solution to avoid deadlock.
>
>The deadlock case in autonomous tx's is a bit different.
>
>Assuming you don't intend to allow interleaving, where you can switch
>between transactions at will rather than just at begin/commit, the only
>way a deadlock can happen is when the outer tx holds a lock that the
>inner tx tries to acquire.
>
>That should be practical to special-case by maintaining a list of parent
>transaction (virtual?) transaction IDs. Attempts to wait on a lock held
>by any of those should fail immediately. There's no point waiting for
>the deadlock detector since the outer tx can never progress and
>commit/rollback to release locks, and it might not be able to see the
>parent/child relationship from outside the backend doing the nested tx
>anyway.

Thanks, sounds to be a good idea. I shall evaluate the same.

Thanks and Regards,
Kumar Rajeev Rastogi

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: WIP: Make timestamptz_out less slow.
Следующее
От: Josh Berkus
Дата:
Сообщение: call for contributor recommendations