Re: Online base backup from the hot-standby

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: Online base backup from the hot-standby
Дата
Msg-id CAHGQGwF2hwT1_xRGBkB-UPXw8qUgc=9napx5Q+u35GH9-qwDWA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Online base backup from the hot-standby  (Jun Ishiduka <ishizuka.jun@po.ntts.co.jp>)
Ответы Re: Online base backup from the hot-standby
Список pgsql-hackers
2011/7/1 Jun Ishiduka <ishizuka.jun@po.ntts.co.jp>:
>
>> On this commitfest, the goal of the patch is to be able to be
>> recovered using "Minimum recovery ending location" in the control file.
>
> Done.

When the standby restarts after it crashes during recovery, it always
checks whether recovery has reached the backup end location by
using minRecoveryPoint even though the standby doesn't start from
the backup. This looks odd.

-        XLogRecPtrIsInvalid(ControlFile->backupStartPoint))
+        (XLogRecPtrIsInvalid(ControlFile->backupStartPoint) ||
+         reachedControlMinRecoveryPoint == true))

The flag 'reachedControlMinRecoveryPoint' is really required? When recovery
reaches minRecoveryPoint, ControlFile->backupStartPoint is reset to zero. So
we can check whether recovery has reached minRecoveryPoint or not by only
doing XLogRecPtrIsInvalid(ControlFile->backupStartPoint). No?

We should check if recovery has reached minRecoveryPoint before calling
CheckRecoveryConsistency() after reading new WAL record? Otherwise,
even if recovery has reached minRecoveryPoint, the standby cannot think
that it's in consistent state until it reads new WAL record.

+                        if (XLByteLT(ControlFile->minRecoveryPoint, EndRecPtr))
+                            ControlFile->minRecoveryPoint = EndRecPtr;

Why does ControlFile->minRecoveryPoint need to be set to EndRecPtr?

Regards,

-- 
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


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

Предыдущее
От: Shigeru Hanada
Дата:
Сообщение: Re: per-column generic option
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: Crash dumps