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

Поиск
Список
Период
Сортировка
От magodo
Тема Re: how to identify the timeline of specified recovery_target_timewhen do multiple PITR
Дата
Msg-id 41a74e2ac23015149bc98631b8dcac0fdb6b6a51.camel@sina.com
обсуждение исходный текст
Ответ на Re: how to identify the timeline of specified recovery_target_timewhen do multiple PITR  (Laurenz Albe <laurenz.albe@cybertec.at>)
Ответы Re: how to identify the timeline of specified recovery_target_timewhen do multiple PITR  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-general
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 timeline 1, because at
> > that
> > time, the timeline is 1 indeed (when there is no timeline 2
> > branched
> > out yet). 
> > 
> > So in other word, my expectation is like I want to get the first
> > timeline which covers the specified time.
> > 
> > As you mentioned, there is no active timeline concept in postgres,
> > then
> > what is the best practice to meet my expectation? Do I have to
> > somehow
> > record the timestamp when archived wal's timeline has been changed,
> > then compare the specified recovery target time with those records
> > to
> > find the first timeline which covers that time?
> 
> As I wrote, that is the default behavior; PostgreSQL will stay on
> the timeline that was active when recovery was started.
> 
> Yours,
> Laurenz Albe

OK... Just take another example:

         A     B
BASE-----+-----+------o1 (recover to A)                              1
         |     |           C
         +.....|.......----+---o2 (regret, recover to B)             2
               |           |    
               +...........|..------o3 (regret again, recover to C)  3
                           | 
                           +........----                             4


Suppose I'm at "o3" and want to recover to point "C". Because I want to
recover to the first timeline which covers this time point, it means I
wish to recover to timeline 2. Then the same question:

> > what is the best practice to meet my expectation? Do I have to
> > somehow
> > record the timestamp when archived wal's timeline has been changed,
> > then compare the specified recovery target time with those records
> > to
> > find the first timeline which covers that time?

---
Magodo
 




В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: tds_fdw binary column
Следующее
От: Raghavendra Rao J S V
Дата:
Сообщение: Please let me know which configuration setting we need to modify tospeedup the pg_dump backup.