Re: Two-phase commmit, plpgsql and plproxy

Поиск
Список
Период
Сортировка
Искать
От
Igor Katson
Тема
Re: Two-phase commmit, plpgsql and plproxy
Дата
Msg-id
499349D3.9080609@gmail.com
Ответ на
Список
Дерево обсуждения
Two-phase commmit, plpgsql and plproxy Igor Katson <descentspb@gmail.com>
Re: Two-phase commmit, plpgsql and plproxy Jeff Davis <pgsql@j-davis.com>
Re: Two-phase commmit, plpgsql and plproxy Igor Katson <descentspb@gmail.com>
Re: Two-phase commmit, plpgsql and plproxy Jeff Davis <pgsql@j-davis.com>
Re: Two-phase commmit, plpgsql and plproxy Igor Katson <descentspb@gmail.com>
Re: Two-phase commmit, plpgsql and plproxy Mark Roberts <mailing_lists@pandapocket.com>
Re: Two-phase commmit, plpgsql and plproxy Joshua Tolley <eggyknap@gmail.com>
Re: [Plproxy-users] Two-phase commmit, plpgsql and plproxy Marko Kreen <markokr@gmail.com>
Jeff Davis wrote:
> On Wed, 2009-02-11 at 12:43 +0300, Igor Katson wrote:
>   
>> ERROR:  XX000: SPI_execute_plan failed executing query "PREPARE 
>> TRANSACTION '2pctest'": SPI_ERROR_TRANSACTION
>>     
>
> It's probably treating the word PREPARE specially. You can avoid this
> problem by using EXECUTE and specifying the command as a string.
>
>   
Yes, doing an EXECUTE helped to create the function.
>> Is there a way to achieve the needed behaviour with two-phase commmit, 
>> plpgsql and plproxy ?
>>     
>
> You can't begin or end a transaction inside a function. If that was
> allowed, what would the function do after the transaction was prepared?
>
>   
> I think you need to do PREPARE TRANSACTION separately, somehow. You
> might need to modify plproxy to do that the way you want.
>   
Thanks, Jeff. That's not good news, cause I am not able to do that.

The postgres manual says, that
" The intended usage of the feature is that a prepared transaction will 
normally be committed or rolled back as soon as an external transaction 
manager has verified that other databases are also prepared to commit. "

So does this "external transaction manager" exist? I am not clear about 
what it is.

В списке pgsql-general по дате отправления
От: Jeff Davis
Дата:
От: Fernando Moreno
Дата:
FAQ