Re: Is DBLINK transactional

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Is DBLINK transactional
Дата
Msg-id b42b73151003120907n1f977887y6132a564af9260b3@mail.gmail.com
обсуждение исходный текст
Ответ на Is DBLINK transactional  ("elias ghanem" <e.ghanem@acteos.com>)
Ответы Re: Is DBLINK transactional  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-performance
On Fri, Mar 12, 2010 at 10:27 AM, elias ghanem <e.ghanem@acteos.com> wrote:
> Hi,
>
> I am using dblink to read data from a remote data base, insert these data in
> the local database, update the red data in the remote database then continue
> to do some other work on the local database in the same transaction.
>
> My question is : Is db link transactional; If the local transaction failed,
> would the update in the remote data base roll back or if the update in the
> remote data base failed, would the insert in the local data base roll back.
>
> If not, is there a way to make db link “transactional”?

of course.  You can always explicitly open a transaction on the remote
side over dblink, do work, and commit it at the last possible moment.
Your transactions aren't perfectly synchronized...if you crash in the
precise moment between committing the remote and the local you can get
in trouble.  The chances of this are extremely remote though.

merlin

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

Предыдущее
От: "elias ghanem"
Дата:
Сообщение: Is DBLINK transactional
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Is DBLINK transactional