Re: Race condition in recovery?

Поиск
Список
Период
Сортировка
От Kyotaro Horiguchi
Тема Re: Race condition in recovery?
Дата
Msg-id 20210518.155808.2163673343516543747.horikyota.ntt@gmail.com
обсуждение исходный текст
Ответ на Re: Race condition in recovery?  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Список pgsql-hackers
At Tue, 18 May 2021 15:52:07 +0900 (JST), Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote in 
> FWIW, you could be get a problematic base backup by the following steps.
> 
> 0. (make sure /tmp/hoge is removed)
> 1. apply the attached patch
> 2. create a primary then start
> 3. create a standby then start
> 4. place standby.signal to the primary, then restart it.
> 5. place the file /tmp/hoge.
> 6. promote the "primary".
> 7. You will see a log line like this
>    LOG:  WAIT START: CHECKPOINT_ONLINE: TLI=2
> 8. Take a base backup (without copying WAL files)

I carelessly have left the "modification" uncommented in the diff file.

@@ -6577,6 +6584,8 @@ StartupXLOG(void)
     else
         recoveryTargetTLI = ControlFile->checkPointCopy.ThisTimeLineID;
 
+    expectedTLEs = readTimeLineHistory(recoveryTargetTLI);
+    elog(LOG, "set expectedtles %d, %d", recoveryTargetTLI, list_length(expectedTLEs));

Disabling the lines would show the result of the ancient fix.

regards.
-- 
Kyotaro Horiguchi
NTT Open Source Software Center



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

Предыдущее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: Race condition in recovery?
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: Testing autovacuum wraparound (including failsafe)