Re: Two Phase commits

Поиск
Список
Период
Сортировка
От David Hooker
Тема Re: Two Phase commits
Дата
Msg-id 001f01c1d43a$86ea0580$6901a8c0@DHOOKER
обсуждение исходный текст
Ответ на Re: Two Phase commits  ("Dave Cramer" <Dave@micro-automation.net>)
Ответы Re: Two Phase commits  ("Dave Cramer" <Dave@micro-automation.net>)
Список pgsql-jdbc
I'm not that versed in two phase commits (2pc) either... my understanding is that there is a "precommit" phase and a "commit" phase.  The precommit tells the database that you are going to commit the transaction.  If the precommit succeeds, then the database is telling you that it guarantees that the commit will succeed.
 
2pc is used in distributed transactions where more than one transactional resource (i.e. 2 or more databases) are participating in a global transaction, where all commits to all resources must all succeed or fail together.  This is coordinated by a "transaction manager" which manages the precommit/commit/rollback protocols among the resources enlisted in the global transaction.  In this scenario, the TM calls precommit on all resources, and if all succeed, then it commits each resource.
 
I'm trying to implement this global transaction concept in my system, where I have one or more PostgreSQL databases and possibly other transactional resources such as JMS queues.  From what I understand, other databases such as Oracle amd SQL Server support 2pcs, but I haven't worked with them at that level.  So my question is "How do I use PostgreSQL as a 2-phase resource?"
 
Clear as mud?   ;-)
-----Original Message-----
From: Dave Cramer [mailto:Dave@micro-automation.net]
Sent: Monday, March 25, 2002 1:55 PM
To: 'David Hooker'; pgsql-jdbc@postgresql.org
Subject: RE: [JDBC] Two Phase commits

David,
 
Can you help me out here, I'm not familiar with two phase commits, why would you want to, and what would you expect the behaviour to be?
 
Dave
-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of David Hooker
Sent: Monday, March 25, 2002 1:40 PM
To: pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] Two Phase commits

In other words, how do you tell the database to pre-commit???
-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of David Hooker
Sent: Sunday, March 24, 2002 1:33 AM
To: pgsql-jdbc@postgresql.org
Subject: [JDBC] Two Phase commits

How does one perform a 2-phase commit against PostgreSQL?  In reading the JDBC driver code, the driver itself doesn't implement a 2pc protocol, so I'm wondering if it's even possible to do.  Any thoughts?

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "Dave Cramer"
Дата:
Сообщение: Re: Two Phase commits
Следующее
От: "Dave Cramer"
Дата:
Сообщение: Re: Two Phase commits