Re: 2 connections 1 transaction - Mailing list pgsql-general

From Dmitry Tkach
Subject Re: 2 connections 1 transaction
Date
Msg-id 3F16B976.80306@openratings.com
Whole thread Raw
In response to 2 connections 1 transaction  ("Daniel Schuchardt" <daniel_schuchardt@web.de>)
List pgsql-general
The short answer is - there is no way you can do it.
Different connections in postgres (and in every other DB engine I heard
of) can never share the same transaction.

As far as I can see, the only way to do what you want is to rethink your
architechture so that the clients never talk directly to the database,
and always go through the app server... or, the other way around - get
rid of the app server, and just have every client go to the database
directly. You can' thave it both ways.

Dima


Daniel Schuchardt wrote:

> Hi @ all,
>
> Our software consists of a Client-Side App and a Application Server.
> Every client owns a direct connection to the PSql-Server and for every
> Client the Application-Server also creates a connection to the
> PSql-Server. The problem is that it is nescesary that the Client and
> the Application-Server are in the same transaction. But how say
> connection x to be in the same transaction like connection y?
>
> Thanks for help,
>
> Daniel
>
>




pgsql-general by date:

Previous
From: "Shridhar Daithankar"
Date:
Subject: Re: 2 connections 1 transaction
Next
From: "scott.marlowe"
Date:
Subject: Re: Strange behaviour of Postgresql (Postgresql 7.3.3