Обсуждение: PostgreSQL and distributed transactions

Поиск
Список
Период
Сортировка

PostgreSQL and distributed transactions

От
Jayadevan M
Дата:
Hello everyone,
I saw a question about PostgreSQL and distributed transactions in the mail
archives. But it looked a bit old. I am hoping things have changed and
hence this mail.
We have a database for 'Admin' which will be one PostgreSQL server. We
have different servers for our 'Clients'. We did the design that way
because clients and related data may run into huge volumes. As far as the
application use by clients are concerned, the request will be redirected
to any one server (where the particular client's data resides) and we are
OK.
But the initial setup for the client is done by 'Admin' and in that
work-flow, we need distributed transactions. The transaction will start
from the 'Admin" server, do some inserts on the 'Client' server and then
either rollback or commit on both the servers. Is it possible to do this
with PostgreSQL? Any helpful links?
Thank you,
Jayadevan





DISCLAIMER:

"The information in this e-mail and any attachment is intended only for
the person to whom it is addressed and may contain confidential and/or
privileged material. If you have received this e-mail in error, kindly
contact the sender and destroy all copies of the original communication.
IBS makes no warranty, express or implied, nor guarantees the accuracy,
adequacy or completeness of the information contained in this email or any
attachment and is not liable for any errors, defects, omissions, viruses
or for resultant loss or damage, if any, direct or indirect."






Re: PostgreSQL and distributed transactions

От
Dimitri Fontaine
Дата:
Jayadevan M <Jayadevan.Maymala@ibsplc.com> writes:
> But the initial setup for the client is done by 'Admin' and in that
> work-flow, we need distributed transactions. The transaction will start
> from the 'Admin" server, do some inserts on the 'Client' server and then
> either rollback or commit on both the servers. Is it possible to do this
> with PostgreSQL? Any helpful links?

See about 2 Phase Commit, but you will need a transaction manager I guess :

  http://www.postgresql.org/docs/current/static/sql-prepare-transaction.html

Regards,
--
dim

Re: PostgreSQL and distributed transactions

От
Joshua Tolley
Дата:
On Thu, Jul 29, 2010 at 11:42:14AM +0200, Dimitri Fontaine wrote:
> Jayadevan M <Jayadevan.Maymala@ibsplc.com> writes:
> > But the initial setup for the client is done by 'Admin' and in that
> > work-flow, we need distributed transactions. The transaction will start
> > from the 'Admin" server, do some inserts on the 'Client' server and then
> > either rollback or commit on both the servers. Is it possible to do this
> > with PostgreSQL? Any helpful links?
>
> See about 2 Phase Commit, but you will need a transaction manager I guess :
>
>   http://www.postgresql.org/docs/current/static/sql-prepare-transaction.html
>

If I may be allowed to toot my own horn, may I suggest this as an example:
http://blog.endpoint.com/2010/07/distributed-transactions-and-two-phase.html

--
Joshua Tolley / eggyknap
End Point Corporation
http://www.endpoint.com

Вложения

Re: PostgreSQL and distributed transactions

От
Jayadevan M
Дата:
Hello,

> >
> > See about 2 Phase Commit, but you will need a transaction manager I
guess :
> >
> >
http://www.postgresql.org/docs/current/static/sql-prepare-transaction.html
> >
>
> If I may be allowed to toot my own horn, may I suggest this as an
example:
>
http://blog.endpoint.com/2010/07/distributed-transactions-and-two-phase.html

>
Any horn tooted by anyone, if it solves a problem, is music. Thank you for
the link.
We use Hibernate. Let me see if the team which asked me this question find
this useful.
Regards,
Jayadevan





DISCLAIMER:

"The information in this e-mail and any attachment is intended only for
the person to whom it is addressed and may contain confidential and/or
privileged material. If you have received this e-mail in error, kindly
contact the sender and destroy all copies of the original communication.
IBS makes no warranty, express or implied, nor guarantees the accuracy,
adequacy or completeness of the information contained in this email or any
attachment and is not liable for any errors, defects, omissions, viruses
or for resultant loss or damage, if any, direct or indirect."