[Fwd: FAQ update about transaction interleaving]

Lists: pgsql-jdbc
From: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: [Fwd: FAQ update about transaction interleaving]
Date: 2006-11-10 12:33:52
Message-ID: 455471B0.6050606@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

I posted this some time ago, but no-one reacted, so I'm reposting...

Is there a preferred format for FAQ updates?

-------- Original Message --------
From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Date: Fri, 29 Sep 2006 16:34:11 +0100
Subject: FAQ update about transaction interleaving

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


From: Mark Lewis <mark(dot)lewis(at)mir3(dot)com>
To: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [Fwd: FAQ update about transaction interleaving]
Date: 2006-11-10 14:36:21
Message-ID: 1163169381.13226.54.camel@archimedes
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

I think that the preferred format for FAQ updates is as a patch to the

www project's src/documentation/content/xdocs/documentation/faq.xml file
from CVS.

-- Mark

On Fri, 2006-11-10 at 12:33 +0000, Heikki Linnakangas wrote:
> I posted this some time ago, but no-one reacted, so I'm reposting...
>
> Is there a preferred format for FAQ updates?
>
> -------- Original Message --------
> From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
> To: pgsql-jdbc(at)postgresql(dot)org
> Date: Fri, 29 Sep 2006 16:34:11 +0100
> Subject: FAQ update about transaction interleaving
>
> 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.
>
>


From: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
To: "Mark Lewis" <mark(dot)lewis(at)mir3(dot)com>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: [Fwd: FAQ update about transaction interleaving]
Date: 2006-11-10 16:25:19
Message-ID: 4554A7EF.1080305@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

Mark Lewis wrote:
> I think that the preferred format for FAQ updates is as a patch to the
>
> www project's src/documentation/content/xdocs/documentation/faq.xml file
> from CVS.

Ok, thanks. Here you go.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

Attachment Content-Type Size
xa-faq-update.diff text/plain 2.3 KB