Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 14B5E632B5E for ; Sat, 13 Mar 2010 08:11:21 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 98641-04 for ; Sat, 13 Mar 2010 12:11:10 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.postnewspapers.com.au (202-89-185-120.static.dsl.amnet.net.au [202.89.185.120]) by mail.postgresql.org (Postfix) with ESMTP id 69F54632461 for ; Sat, 13 Mar 2010 08:11:10 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by mail.postnewspapers.com.au (Postfix) with ESMTP id 64582AE3F2; Sat, 13 Mar 2010 20:09:53 +0800 (WST) X-Virus-Scanned: Debian amavisd-new at postnewspapers.com.au Received: from mail.postnewspapers.com.au ([127.0.0.1]) by localhost (mail2.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ktjelHxSrSj8; Sat, 13 Mar 2010 20:09:48 +0800 (WST) Received: from [10.1.1.2] (124-168-235-77.dyn.iinet.net.au [124.168.235.77]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "Craig Ringer", Issuer "POST Certificate Authority" (verified OK)) by mail.postnewspapers.com.au (Postfix) with ESMTPSA id 3F1C0AE3F1; Sat, 13 Mar 2010 20:09:48 +0800 (WST) Message-ID: <4B9B80C9.4010004@postnewspapers.com.au> Date: Sat, 13 Mar 2010 20:10:49 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: Jeff Davis CC: Merlin Moncure , elias ghanem , pgsql-performance@postgresql.org Subject: Re: Is DBLINK transactional References: <201003121524.o2CFOD26012586@relay-ext.ornis.com> <1268430857.32299.11.camel@monkey-cat.sm.truviso.com> In-Reply-To: <1268430857.32299.11.camel@monkey-cat.sm.truviso.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201003/130 X-Sequence-Number: 37955 On 13/03/2010 5:54 AM, Jeff Davis wrote: > On Fri, 2010-03-12 at 12:07 -0500, Merlin Moncure wrote: >> 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. > > If you want a better guarantee than that, consider using 2PC. Translation in case you don't know: 2PC = two phase commit. Note that you have to monitor "lost" transactions that were prepared for commit then abandoned by the controlling app and periodically get rid of them or you'll start having issues. > The problem with things that are "extremely remote" possibilities are > that they tend to be less remote than we expect ;) ... and they know just when they can happen despite all the odds to maximise the pain and chaos caused. -- Craig Ringer