Re: Standby recovers records from wrong timeline - Mailing list pgsql-hackers

From Kyotaro Horiguchi
Subject Re: Standby recovers records from wrong timeline
Date
Msg-id 20221021.174440.1955006618825535186.horikyota.ntt@gmail.com
Whole thread Raw
In response to Re: Standby recovers records from wrong timeline  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Responses Re: Standby recovers records from wrong timeline
Re: Standby recovers records from wrong timeline
List pgsql-hackers
At Fri, 21 Oct 2022 17:12:45 +0900 (JST), Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote in 
> latest works. It dones't consider the case of explict target timlines
> so it's just a PoC.  (So this doesn't work if recovery_target_timeline
> is set to 2 for the "standby" in the repro.)

So, finally I noticed that the function XLogFileReadAnyTLI is not
needed at all if we are going this direction.

Regardless of recvoery_target_timeline is latest or any explicit
imeline id or checkpoint timeline, what we can do to reach the target
timline is just to follow the history file's direction.

If segments are partly gone while reading on a timeline, a segment on
the older timelines is just a crap since it should be incompatible.

So.. I'm at a loss about what the function is for.

Please anyone tell me why do we need the behavior of
XLogFileReadAnyTLI() at all?

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



pgsql-hackers by date:

Previous
From: davinder singh
Date:
Subject: Re: cross-platform pg_basebackup
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: fix stats_fetch_consistency value in postgresql.conf.sample