Re: how to identify the timeline of specified recovery_target_time when do multiple PITR

2018-10-12 Thread magodo
On Thu, 2018-10-11 at 19:53 +0200, Laurenz Albe wrote: > Indeed, your sentence > > > if , for example, it recovered to "A" at "o1", then > > the switched WAL(in case of stop-then-recover) or .partial > > corresponding WAL(in case of promote) is the last WAL of the > > timeline1 > > seems to cont

Re: how to identify the timeline of specified recovery_target_time when do multiple PITR

2018-10-11 Thread Laurenz Albe
magodo wrote: > > How can you know how many WAL segments there are on timeline 1, and if > > there is one that extends past 2018-10-11 12:00:00 or not? > > This is the exact problem I want to figure out. My approach is as you said, > I will parse each archived WAL segment via `pg_xlogdump -r Trans

Re: how to identify the timeline of specified recovery_target_time when do multiple PITR

2018-10-11 Thread Laurenz Albe
magodo wrote: > On Thu, 2018-10-11 at 06:35 +0200, Laurenz Albe wrote: > > magodo wrote: > > > OK... Just take another example: > > > > > > A B > > > BASE-+-+--o1 (recover to > > > A) 1 > > > | | C > > > +.|.

Re: how to identify the timeline of specified recovery_target_time when do multiple PITR

2018-10-11 Thread magodo
On Thu, 2018-10-11 at 06:35 +0200, Laurenz Albe wrote: > magodo wrote: > > OK... Just take another example: > > > > A B > > BASE-+-+--o1 (recover to > > A) 1 > > | | C > > +.|...+---o2 (regret, reco

Re: how to identify the timeline of specified recovery_target_time when do multiple PITR

2018-10-10 Thread Laurenz Albe
magodo wrote: > OK... Just take another example: > > A B > BASE-+-+--o1 (recover to A) 1 > | | C > +.|...+---o2 (regret, recover to B) 2 >| | >

Re: how to identify the timeline of specified recovery_target_time when do multiple PITR

2018-10-10 Thread magodo
On Wed, 2018-10-10 at 18:21 +0200, Laurenz Albe wrote: > magodo wrote: > > > By default, recovery will stay on the timeline where it started. > > > If you want to go to timeline 2 or 3, you have to specify > > > recovery_target_timeline. > > > > > For me, the specified point corresponds to timel

Re: how to identify the timeline of specified recovery_target_time when do multiple PITR

2018-10-10 Thread Laurenz Albe
magodo wrote: > > By default, recovery will stay on the timeline where it started. > > If you want to go to timeline 2 or 3, you have to specify > > recovery_target_timeline. > > > For me, the specified point corresponds to timeline 1, because at that > time, the timeline is 1 indeed (when there i

Re: how to identify the timeline of specified recovery_target_time when do multiple PITR

2018-10-10 Thread magodo
On Wed, 2018-10-03 at 08:06 +0200, Laurenz Albe wrote: > magodo wrote: > > I read the document about recovery configuration, it says: > > [...] > > > Therefore, suppose I am going to recover to a point of some child > > timeline, to identify the point, I have to specify either > > recovery_targ

Re: how to identify the timeline of specified recovery_target_time when do multiple PITR

2018-10-02 Thread Laurenz Albe
magodo wrote: > I read the document about recovery configuration, it says: [...] > Therefore, suppose I am going to recover to a point of some child > timeline, to identify the point, I have to specify either > recovery_target_name or recovery_target_time, and also specify the > recovery_target_t