Re: Two Phase Commit support

Поиск
Список
Период
Сортировка
От Cristóvão Dalla Costa
Тема Re: Two Phase Commit support
Дата
Msg-id 3DBDA5E0.9010604@bsi.com.br
обсуждение исходный текст
Ответ на Two Phase Commit support  ("Stephen J. Thompson" <stephen@cass-ltd.co.uk>)
Список 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.




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

Предыдущее
От: Larry Rosenman
Дата:
Сообщение: Re: command-line history (readline) fails
Следующее
От: wsheldah@lexmark.com
Дата:
Сообщение: Re: Two Phase Commit support