Re: WAL consistency check facility - Mailing list pgsql-hackers

From Kuntal Ghosh
Subject Re: WAL consistency check facility
Date
Msg-id CAGz5QC+1AVQ=gGoq2_S_M+CWzc7OXko2m_yXZrxSTjL76MUW1g@mail.gmail.com
Whole thread Raw
In response to Re: WAL consistency check facility  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: WAL consistency check facility
List pgsql-hackers
On Thu, Nov 3, 2016 at 2:27 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> On Thu, Nov 3, 2016 at 4:04 PM, Michael Paquier
> <michael.paquier@gmail.com> wrote:
>> Wouldn't the definition of a new redo action make sense then? Say
>> SKIPPED. None of the existing actions match the non-apply case.
>
> I just took 5 minutes to look at the code and reason about it, and
> something like what your patch is doing would be actually fine. Still
> I don't think that checking for the apply flag in the macro routine
> should look for has_image. Let's keep things separate.
Actually, I just verified that bimg_info is not even valid if
has_image is not set.
In DecodeXLogRecord, we initialize bimg_info only when has_image flag
is set. So, keeping them
separate doesn't look a good approach to me. If we keep them separate,
the output
of the following assert is undefined:
Assert(XLogRecHasBlockImage(record, block_id) ||
!XLogRecBlockImageApply(record, block_id)).

Thoughts??
-- 
Thanks & Regards,
Kuntal Ghosh
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: WAL consistency check facility
Next
From: Michael Paquier
Date:
Subject: Re: WAL consistency check facility