Re: Crash by targetted recovery
От | Fujii Masao |
---|---|
Тема | Re: Crash by targetted recovery |
Дата | |
Msg-id | 899463ee-549c-3f30-5752-ae1988ddc066@oss.nttdata.com обсуждение исходный текст |
Ответ на | Crash by targetted recovery (Kyotaro Horiguchi <horikyota.ntt@gmail.com>) |
Ответы |
Re: Crash by targetted recovery
|
Список | pgsql-hackers |
On 2020/02/27 12:48, Kyotaro Horiguchi wrote: > Hello. > > We found that targetted promotion can cause an assertion failure. The > attached TAP test causes that. > >> TRAP: FailedAssertion("StandbyMode", File: "xlog.c", Line: 12078) > > After recovery target is reached, StartupXLOG turns off standby mode > then refetches the last record. If the last record starts from the > previous WAL segment, the assertion failure is triggered. Good catch! > The wrong point is that StartupXLOG does random access fetching while > WaitForWALToBecomeAvailable is thinking it is still in streaming. I > think if it is called with random access mode, > WaitForWALToBecomeAvailable should move to XLOG_FROM_ARCHIVE even > though it is thinking that it is still reading from stream. I failed to understand why random access while reading from stream is bad idea. Could you elaborate why? Isn't it sufficient to set currentSource to 0 when disabling StandbyMode? Regards, -- Fujii Masao NTT DATA CORPORATION Advanced Platform Technology Group Research and Development Headquarters
В списке pgsql-hackers по дате отправления: