Re: 2-phase commit

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: 2-phase commit
Дата
Msg-id 24719.1064597668@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: 2-phase commit  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: 2-phase commit  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: 2-phase commit  ("Marc G. Fournier" <scrappy@postgresql.org>)
Re: 2-phase commit  ("Marc G. Fournier" <scrappy@postgresql.org>)
Re: 2-phase commit  (Andrew Sullivan <andrew@libertyrms.info>)
Список pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Could we allow slaves to check if the backend is still alive, perhaps by
> asking the postmaster, similar to what we do with the cancel signal ---
> that way, the slave would never time out and always wait if the master
> was alive.

You're not considering the possibility of a transient communication
failure.  The fact that you cannot currently contact the other guy
is not proof that he's not still alive.

Example:
Master        Slave------        -----commit ready-->        <--OKcommit done->XX

where "->XX" means the message gets lost due to network failure.  Now
what?  The slave cannot abort; he promised he could commit, and he does
not know whether the master has committed or not.  The master does not
know the slave's state either; maybe he got the second message, and
maybe he didn't.  Both sides are forced to keep information about the 
open transaction indefinitely.  Timing out on either side could yield
the wrong result.
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: 2-phase commit
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Error message cleanup