Re: 回复: Why is XLOG_FPI_FOR_HINT always need backups?

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: 757634191(at)qq(dot)com, japinli(at)hotmail(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: 回复: Why is XLOG_FPI_FOR_HINT always need backups?
Date: 2021-07-16 15:14:34
Message-ID: 652d0e28-28f2-44e5-5b97-5f38bd976290@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message James Coleman 2021-07-16 15:37:15 Re: Early Sort/Group resjunk column elimination.
Previous Message Masahiko Sawada 2021-07-16 15:02:58 Re: Skipping logical replication transactions on subscriber side