Re: Is DBLINK transactional

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 12, 2010 at 10:27 AM, elias ghanem <e.ghanem@xxxxxxxxxx> 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

-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux