Re: Transactions through dblink_exec() - Mailing list pgsql-hackers

From Joe Conway
Subject Re: Transactions through dblink_exec()
Date
Msg-id 3DA91642.2000202@joeconway.com
Whole thread Raw
In response to Transactions through dblink_exec()  (Masaru Sugawara <rk73@sea.plala.or.jp>)
List pgsql-hackers
Mike Mascari wrote:
> How can dblink() possibly be used safely for non-readonly transactions 
> without a full implementation of a two-phase commit protocol? What 
> happens when the remote server issues the COMMIT and then the local 
> server crashes?
> 

It can't be used safely if you're trying to ensure a distributed transaction 
either fails or commits. At least I can't think of a way without two-phase 
commits implemented.

But depending on your scenario, just being sure that the remote transaction 
fails or succeeds as a unit may be all you care about.

Joe




pgsql-hackers by date:

Previous
From: Joe Conway
Date:
Subject: Re: Transactions through dblink_exec()
Next
From: Barry Lind
Date:
Subject: experiences with autocommit functionality in 7.3