Re: standby promotion can create unreadable WAL
От | Kyotaro Horiguchi |
---|---|
Тема | Re: standby promotion can create unreadable WAL |
Дата | |
Msg-id | 20220829.131352.1390194912445731838.horikyota.ntt@gmail.com обсуждение исходный текст |
Ответ на | Re: standby promotion can create unreadable WAL (Dilip Kumar <dilipbalaut@gmail.com>) |
Ответы |
Re: standby promotion can create unreadable WAL
|
Список | pgsql-hackers |
At Sun, 28 Aug 2022 10:16:21 +0530, Dilip Kumar <dilipbalaut@gmail.com> wrote in > On Fri, Aug 26, 2022 at 7:53 PM Robert Haas <robertmhaas@gmail.com> wrote: > > v2 attached. > > The patch LGTM, this patch will apply on master and v15. PFA patch > for back branches. StandbyMode is obviously wrong. On the other hand I thought that !ArchiveRecoveryRequested is somewhat wrong, too (, as I stated in the pointed thread). On second thought, I changed my mind that it is right. After aborted contrec is found, The cause of the confusion is that I somehow thought that archive recovery continues from the aborted-contrec record. However, that assumption is wrong. The next redo starts from the beginning of the aborted contrecord so we should forget abouat the old missing/aborted contrec info when archive recovery is requested. In the end, the point is that we need to set the global variables only when XLogPrefetcherReadRecord() (or XLogReadRecord()) returns NULL and we return it to the caller. Is it worth to do a small refactoring like the attached? If no, I'm fine with the proposed patch including the added assertion. # I havent reproduce the issue of the OP in the other thread yet, and # also not found how to reproduce this issue, though.. regards. -- Kyotaro Horiguchi NTT Open Source Software Center
Вложения
В списке pgsql-hackers по дате отправления: