Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id B772B9FB394 for ; Fri, 29 Sep 2006 12:34:10 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 68239-03 for ; Fri, 29 Sep 2006 12:34:03 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from webmail.enterprisedb.com (edb04.managed.contegix.com [63.246.7.176]) by postgresql.org (Postfix) with ESMTP id 992539FB393 for ; Fri, 29 Sep 2006 12:34:03 -0300 (ADT) Received: from [192.168.1.33] (client-82-3-69-48.manc.adsl.virgin.net [82.3.69.48]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by webmail.enterprisedb.com (Postfix) with ESMTP id 760ADA24A79 for ; Fri, 29 Sep 2006 10:34:02 -0500 (CDT) Message-ID: <451D3CF3.5010401@enterprisedb.com> Date: Fri, 29 Sep 2006 16:34:11 +0100 From: Heikki Linnakangas User-Agent: Thunderbird 1.5.0.5 (X11/20060812) MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: FAQ update about transaction interleaving 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=0.155 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200609/150 X-Sequence-Number: 15868 Our FAQ entry on XA support is quite vague; most users don't know what transaction interleaving is or why they should care. Here's an updated version based on a response I gave earlier to a post asking about it: ----------------- 1.1. Does the driver have XA support? Yes, starting with the 8.1dev-403 driver. However, the transaction interleaving is not supported. 1.2. What is "transaction interleaving"? Transaction interleaving means that one database connection can be used for multiple transactions at the same time, switching between the transactions. Transaction interleaving is mostly useless, but it's a required part of the JTA specification. Some application servers use it to allow a bit more concurrency without allocating a bigger jdbc connection pool. Few JDBC drivers support transaction interleaving properly. Some fake it by issuing early prepare commands, risking transaction integrity, some give strange error messages, some fail in other, subtle ways. The PostgreSQL JDBC driver does it's best to detect interleaving and throws a proper error message when it can't do what's requested. Because of the lack of driver support, all of the popular application servers use provide options to work around it, or don't use it at all. Therefore, lack of transaction interleaving shouldn't affect your application or data integrity. See the JTA specification, section 3.4.4, or search the pgsql-jdbc mailing list archives for more information. 1.3. How to configure application server XXX to work with the PostgreSQL JDBC driver [We need some examples...] Please read the documentation of your application server for details. You might need to set a flag to disable transaction interleaving. In JBoss, for example, set the "track-connection-by-tx" parameter. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com