Inconsistent DB data in Streaming Replication
От | Samrat Revagade |
---|---|
Тема | Inconsistent DB data in Streaming Replication |
Дата | |
Msg-id | CAF8Q-Gxg3PQTf71NVECe-6OzRaew5pWhk7yQtbJgWrFu513s+Q@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: Inconsistent DB data in Streaming Replication
Re: Inconsistent DB data in Streaming Replication Re: Inconsistent DB data in Streaming Replication Re: Inconsistent DB data in Streaming Replication |
Список | pgsql-hackers |
<div dir="ltr"><p class="">Hello,<p class="">We have been trying to figure out possible solutions to the following problemin streaming replication Consider following scenario:<p class="">If master receives commit command, it writes andflushes commit WAL records to the disk, It also writes and flushes data page related to this transaction.<p class="">Themaster then sends WAL records to standby up to the commit WAL record. But before sending these records if failoverhappens then, old master is ahead of standby which is now the new master in terms of DB data leading to inconsistentdata . <p class=""> <p class="">One solution to avoid this situation is have the master send WAL records to standbyand wait for ACK from standby committing WAL files to disk and only after that commit data page related to this transactionon master.<p class="">The main drawback would be increased wait time for the client due to extra round trip tostandby before master sends ACK to client. Are there any other issues with this approach?<p class=""><br /><p class="">Thankyou,<p class=""><p class="">Samrat</div>
В списке pgsql-hackers по дате отправления: