Re: WAL consistency check facility

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: WAL consistency check facility
Дата
Msg-id CAB7nPqQfgs2d6wExshL1zBP-FCQ8Gd+3awLdBHMyqt+rYX4QYA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: WAL consistency check facility  (Kuntal Ghosh <kuntalghosh.2007@gmail.com>)
Ответы Re: WAL consistency check facility  (Kuntal Ghosh <kuntalghosh.2007@gmail.com>)
Список pgsql-hackers
On Wed, Sep 14, 2016 at 2:56 PM, Kuntal Ghosh
<kuntalghosh.2007@gmail.com> wrote:
> Master
> ---------------
> - If wal_consistency check is enabled or needs_backup is set in
> XLogRecordAssemble(), we do a fpw.
> - If a fpw is to be done, then fork_flags is set with BKPBLOCK_HAS_IMAGE,
> which in turns set has_image flag while decoding the record.
> - If a fpw needs to be restored during redo, i.e., needs_backup is true,
> then bimg_info is set with BKPIMAGE_IS_REQUIRED_FOR_REDO.

Here that should be if wal_consistency is true, no?

> Standby
> ---------------
> - In XLogReadBufferForRedoExtended(), if both XLogRecHasBlockImage() and
> XLogRecHasBlockImageForRedo()(added by me*) return true, we restore the
> backup image.
> - In checkConsistency, we only check if XLogRecHasBlockImage() returns true
> when wal_consistency check is enabled for this rmid.

My guess would have been that you do not need to check anymore for
wal_consistency in checkConsistency, making the GUC value only used on
master node.

> *XLogRecHasBlockImageForRedo() checks whether bimg_info is set with
> BKPIMAGE_IS_REQUIRED_FOR_REDO.

Yes, that's more or less what you should have.
-- 
Michael



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

Предыдущее
От: Kuntal Ghosh
Дата:
Сообщение: Re: WAL consistency check facility
Следующее
От: Tom Lane
Дата:
Сообщение: Re: kqueue