Re: 回复: Why is XLOG_FPI_FOR_HINT always need backups? - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: 回复: Why is XLOG_FPI_FOR_HINT always need backups?
Date
Msg-id 652d0e28-28f2-44e5-5b97-5f38bd976290@oss.nttdata.com
Whole thread Raw
In response to Re: 回复: Why is XLOG_FPI_FOR_HINT always need backups?  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Responses Re: 回复: Why is XLOG_FPI_FOR_HINT always need backups?  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
List pgsql-hackers

On 2021/07/16 16:31, Kyotaro Horiguchi wrote:
> Sorry, I missed that the XLogReadBufferForRedo is expected to return
> BLK_RESTORED.  And XLogReadBufferForRedo errors out when it tries to
> read nonexistent page without having an FPI (this happens for FSM
> pages).  Rather than teaching XLogReadBufferExtended to behave
> differrently for the case, I choosed to avoid trying to load the page
> when the corresponding FPI block is missing in XLOG_FPI_FOR_HINT, as
> if the record itself did not exist at all.
> 
> Since differently from XLOG_FPI, XLOG_FPI_FOR_HINT has only one page
> reference at most, but in the attached the decision whether to read
> the page or not is made for each block.

Thanks for updating the patch! It basically looks good to me.

         * Full-page image (FPI) records contain nothing else but a backup
         * block (or multiple backup blocks). Every block reference must
         * include a full-page image - otherwise there would be no point in
         * this record.

The above comment also needs to be updated?

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION



pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: Skipping logical replication transactions on subscriber side
Next
From: James Coleman
Date:
Subject: Re: Early Sort/Group resjunk column elimination.