Re: Standby recovers records from wrong timeline

2022-10-21 Thread Ants Aasma
On Fri, 21 Oct 2022 at 11:44, Kyotaro Horiguchi wrote: > > At Fri, 21 Oct 2022 17:12:45 +0900 (JST), Kyotaro Horiguchi > 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

Re: Standby recovers records from wrong timeline

2022-10-21 Thread Kyotaro Horiguchi
At Fri, 21 Oct 2022 17:44:40 +0900 (JST), Kyotaro Horiguchi wrote in > At Fri, 21 Oct 2022 17:12:45 +0900 (JST), Kyotaro Horiguchi > 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 >

Re: Standby recovers records from wrong timeline

2022-10-21 Thread Kyotaro Horiguchi
At Fri, 21 Oct 2022 17:12:45 +0900 (JST), Kyotaro Horiguchi 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

Re: Standby recovers records from wrong timeline

2022-10-21 Thread Kyotaro Horiguchi
At Fri, 21 Oct 2022 16:45:59 +0900 (JST), Kyotaro Horiguchi wrote in > At Thu, 20 Oct 2022 14:44:40 +0300, Ants Aasma wrote in > > My understanding is that backup archives are supposed to remain valid > > even after PITR or equivalently a lagging standby promoting. > > Sorry, I was dim

Re: Standby recovers records from wrong timeline

2022-10-21 Thread Kyotaro Horiguchi
At Thu, 20 Oct 2022 14:44:40 +0300, Ants Aasma wrote in > My understanding is that backup archives are supposed to remain valid > even after PITR or equivalently a lagging standby promoting. Sorry, I was dim because of maybe catching a cold:p On second thought. everything works fine if the

Re: Standby recovers records from wrong timeline

2022-10-20 Thread Ants Aasma
On Thu, 20 Oct 2022 at 11:30, Kyotaro Horiguchi wrote: > > primary_restored did a time-travel to past a bit because of the > recovery_target=immediate. In other words, the primary_restored and > the replica diverge. I don't think it is legit to connect a diverged > standby to a primary.

Re: Standby recovers records from wrong timeline

2022-10-20 Thread Kyotaro Horiguchi
Forgot a caveat. At Thu, 20 Oct 2022 17:34:13 +0900 (JST), Kyotaro Horiguchi wrote in > At Wed, 19 Oct 2022 18:50:09 +0300, Ants Aasma wrote in > > When standby is recovering to a timeline that doesn't have any segments > > archived yet it will just blindly blow past the timeline switch

Re: Standby recovers records from wrong timeline

2022-10-20 Thread Kyotaro Horiguchi
Sorry, a correction needed.. At Thu, 20 Oct 2022 17:29:57 +0900 (JST), Kyotaro Horiguchi wrote in > At Wed, 19 Oct 2022 18:50:09 +0300, Ants Aasma wrote in > > When standby is recovering to a timeline that doesn't have any segments > > archived yet it will just blindly blow past the timeline

Re: Standby recovers records from wrong timeline

2022-10-20 Thread Kyotaro Horiguchi
At Wed, 19 Oct 2022 18:50:09 +0300, Ants Aasma wrote in > When standby is recovering to a timeline that doesn't have any segments > archived yet it will just blindly blow past the timeline switch point and > keeps on recovering on the old timeline. Typically that will eventually > result in an

Standby recovers records from wrong timeline

2022-10-19 Thread Ants Aasma
When standby is recovering to a timeline that doesn't have any segments archived yet it will just blindly blow past the timeline switch point and keeps on recovering on the old timeline. Typically that will eventually result in an error about incorrect prev-link, but under unhappy circumstances