Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id AE2471337BA7 for ; Wed, 17 Nov 2010 14:47:26 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 29733-03-2 for ; Wed, 17 Nov 2010 18:47:19 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og107.obsmtp.com (exprod7og107.obsmtp.com [64.18.2.167]) by mail.postgresql.org (Postfix) with SMTP id 9479C1337B8F for ; Wed, 17 Nov 2010 14:47:15 -0400 (AST) Received: from source ([209.85.215.182]) by exprod7ob107.postini.com ([64.18.6.12]) with SMTP ID DSNKTOQjMhrTHV9JPHTomqUWtqm333PW6hDh@postini.com; Wed, 17 Nov 2010 10:47:16 PST Received: by mail-ey0-f182.google.com with SMTP id 7so1416572eyb.13 for ; Wed, 17 Nov 2010 10:47:14 -0800 (PST) Received: by 10.213.34.66 with SMTP id k2mr2670764ebd.61.1290019633682; Wed, 17 Nov 2010 10:47:13 -0800 (PST) Received: from [192.168.1.183] (dsl-hkibrasgw2-ff7ac300-240.dhcp.inet.fi [88.195.122.240]) by mx.google.com with ESMTPS id w20sm2534632eeh.12.2010.11.17.10.47.12 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 17 Nov 2010 10:47:13 -0800 (PST) Message-ID: <4CE42331.30109@enterprisedb.com> Date: Wed, 17 Nov 2010 20:47:13 +0200 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; fi-FI; rv:1.9.1.15) Gecko/20101030 Icedove/3.0.10 MIME-Version: 1.0 To: Maciek Sakrejda CC: Peter Tap , pgsql-jdbc@postgresql.org Subject: Re: Transactional support across multiple machines... References: <751378.43371.qm@web62302.mail.re1.yahoo.com> In-Reply-To: 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=-4.2 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3 X-Spam-Level: X-Archive-Number: 201011/42 X-Sequence-Number: 21163 On 17.11.2010 20:40, Maciek Sakrejda wrote: > Prepared transactions: > http://www.postgresql.org/docs/9.0/static/sql-prepare-transaction.html Yeah, two-phase commit is the usual solution. But you shouldn't usually try to implement that yourself, you should pick an existing Transaction Manager. Java application servers usually include one, so if you're using an application server, just configure your application to use XA connections and let the app server handle the two-phase commit for you. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com