Re: If SyncRepWaitForLSN() fails, would the postgres backend do a roll-back?

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема Re: If SyncRepWaitForLSN() fails, would the postgres backend do a roll-back?
Дата
Msg-id 20160608.194356.2193217335998729028.t-ishii@sraoss.co.jp
обсуждение исходный текст
Ответ на If SyncRepWaitForLSN() fails, would the postgres backend do a roll-back?  (Rui Hai Jiang <ruihaij@gmail.com>)
Ответы Re: If SyncRepWaitForLSN() fails, would the postgres backend do a roll-back?  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
> Hi,
> 
> I'm researching the synchronous replication. I see the backend of the
> Primary Server calls SyncRepWaitForLSN() to wait for the Standby Server to
> write the WAL records.
> 
> If some thing happens, such as network failure or disk failure, causes the
> Standby Server fail to receive WAL records or fail to write WAL records,
> would the backend of the Primary Server catch and handle this failure?
> Would the backend roll-back the transactions? Would the backend continue to
> work?

I don't think the backend would roll back the transaction because when
SyncRepWaitForLSN() is called, the transaction has been already
committed. There's no way to roll back a transaction which has been
committed.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp



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

Предыдущее
От: Rui Hai Jiang
Дата:
Сообщение: If SyncRepWaitForLSN() fails, would the postgres backend do a roll-back?
Следующее
От: Thom Brown
Дата:
Сообщение: Re: gettimeofday is at the end of its usefulness?