From: | Cristóvão Dalla Costa <cbraga(at)bsi(dot)com(dot)br> |
---|---|
To: | Robert Treat <xzilla(at)users(dot)sourceforge(dot)net> |
Cc: | stephen(at)cass-ltd(dot)co(dot)uk, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Two Phase Commit support |
Date: | 2002-10-28 21:02:24 |
Message-ID: | 3DBDA5E0.9010604@bsi.com.br |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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
>
>
> 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.
From | Date | Subject | |
---|---|---|---|
Next Message | wsheldah | 2002-10-28 21:14:16 | Re: Two Phase Commit support |
Previous Message | Larry Rosenman | 2002-10-28 21:01:21 | Re: command-line history (readline) fails |