Two Phase Commit support

Started by Stephen J. Thompsonover 23 years ago6 messagesgeneral
Jump to latest
#1Stephen J. Thompson
stephen@cass-ltd.co.uk

Hello all,

Is it correct that postgresql can not support two phase commits? If not is
there any plans to do so? We are doing a large amount of development on EJB
servers and need to perform two phase commits between the database server and
the mom server.

Regards,

Stephen.

#2Robert Treat
xzilla@users.sourceforge.net
In reply to: Stephen J. Thompson (#1)
Re: Two Phase Commit support

I'm not sure of the functionality your looking for, can you point me to
a definition of "two phased commits"?

Robert Treat

Show quoted text

On Sat, 2002-10-26 at 06:53, Stephen J. Thompson wrote:

Hello all,

Is it correct that postgresql can not support two phase commits? If not is
there any plans to do so? We are doing a large amount of development on EJB
servers and need to perform two phase commits between the database server and
the mom server.

Regards,

Stephen.

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

#3Cristóvão Dalla Costa
cbraga@bsi.com.br
In reply to: Stephen J. Thompson (#1)
Re: Two Phase Commit support

Robert Treat wrote:

I'm not sure of the functionality your looking for, can you point me to
a definition of "two phased commits"?

Robert Treat

He's probably updating/inserting data on many pgsql servers at once,
two-phase commits are the best-known algorithm to do it safely:

Phase 1: Perform queries on all servers, commit

-- wait for commit confirmation from all servers

Phase 2: If there have not been any errors, perform the "real" commit on
all servers; else perform a rollback and undo changes.

The commit from phase 1 isn't a real commit, although data is written to
disk, etc, the database still waits for the second commit to make the
changes visible.

I don't think there's any way to do it in Pgsql. Once you committed the
data the first time, the only way to undo the changes is to send a batch
of queries to reverse them.

Crist�v�o

Show quoted text

On Sat, 2002-10-26 at 06:53, Stephen J. Thompson wrote:

Hello all,

Is it correct that postgresql can not support two phase commits? If

not is

there any plans to do so? We are doing a large amount of development

on EJB

servers and need to perform two phase commits between the database

server and

the mom server.

Regards,

Stephen.

#4Noname
wsheldah@lexmark.com
In reply to: Cristóvão Dalla Costa (#3)
Re: Two Phase Commit support

I agree with Cristóvão. Also, two-phase commit only makes sense in the
context of multiple database servers which are replicating to each other in
real time. Once postgresql has replication in place then they should
probably start considering two-phase commit; unless they decide to roll out
both at once of course. ;-)

I continue to be impressed with the progress of the postgresql development
team, and how stable the released versions are. Keep up the good work!

Wes Sheldahl

Cristóvão Dalla Costa <cbraga@bsi.com.br>@postgresql.org on 10/28/2002
06:02:24 PM

Sent by: pgsql-general-owner@postgresql.org

To: Robert Treat <xzilla@users.sourceforge.net>
cc: stephen@cass-ltd.co.uk, "pgsql-general@postgresql.org"
<pgsql-general@postgresql.org>
Subject: Re: [GENERAL] Two Phase Commit support

Robert Treat wrote:

I'm not sure of the functionality your looking for, can you point me to
a definition of "two phased commits"?

Robert Treat

He's probably updating/inserting data on many pgsql servers at once,
two-phase commits are the best-known algorithm to do it safely:

<details snipped>

I don't think there's any way to do it in Pgsql. Once you committed the
data the first time, the only way to undo the changes is to send a batch
of queries to reverse them.

Cristóvão

On Sat, 2002-10-26 at 06:53, Stephen J. Thompson wrote:

Hello all,

Is it correct that postgresql can not support two phase commits? If

not is

there any plans to do so? We are doing a large amount of development

on EJB

servers and need to perform two phase commits between the database

server and

the mom server.

Regards,

Stephen.

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

#5Medi Montaseri
medi.montaseri@intransa.com
In reply to: Stephen J. Thompson (#1)
Re: Two Phase Commit support

I thought databases that support begin-end transactions use "two phase
commit" or some
derivative of it to achieve such operations.

Two Phase Commit is a technology used in distributed applications, to
assure that both
parties (client and server) are understanding each other and no
ambiguity about what just
took place exists.

Robert Treat wrote:

Show quoted text

I'm not sure of the functionality your looking for, can you point me to
a definition of "two phased commits"?

Robert Treat

On Sat, 2002-10-26 at 06:53, Stephen J. Thompson wrote:

Hello all,

Is it correct that postgresql can not support two phase commits? If not is
there any plans to do so? We are doing a large amount of development on EJB
servers and need to perform two phase commits between the database server and
the mom server.

Regards,

Stephen.

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

#6Neil Conway
neilc@samurai.com
In reply to: Noname (#4)
Re: Two Phase Commit support

wsheldah@lexmark.com writes:

I agree with Crist�v�o. Also, two-phase commit only makes sense in the
context of multiple database servers which are replicating to each other in
real time. Once postgresql has replication in place then they should
probably start considering two-phase commit; unless they decide to roll out
both at once of course. ;-)

The Pgreplication project is in the process of implementing a new
eager, multi-master replication design that should be a lot more
scalable than 2PC -- see here for more info:

http://citeseer.nj.nec.com/330257.html

BTW, the Pgreplication homepage is here:

http://gborg.postgresql.org/project/pgreplication/projdisplay.php

Cheers,

Neil

--
Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC