From: Laurenz Albe <laurenz.albe@cybertec.at>
To: magodo <wztdyl@sina.com>
To: pgsql-general@postgresql.org
Subject: Re: how to identify the timeline of specified recovery_target_time when do multiple PITR
Date: Wed, 10 Oct 2018 18:21:15 +0200
Message-ID: <34d85bfc77e9a63890e28ea13953c30508233469.camel@cybertec.at> (raw)
In-Reply-To: <c73ac63988c2a162b9842ad7b5d394387c3703a1.camel@sina.com>
References: <29dd7b5cf905ee53026f96b78a505f1b76b6031b.camel@sina.com>
<0c552a0ee114314ceb026d65f75a98df3e8d22ff.camel@cybertec.at>
<c73ac63988c2a162b9842ad7b5d394387c3703a1.camel@sina.com>
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
--
Cybertec | https://www.cybertec-postgresql.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: laurenz.albe@cybertec.at, wztdyl@sina.com
Subject: Re: how to identify the timeline of specified recovery_target_time when do multiple PITR
In-Reply-To: <34d85bfc77e9a63890e28ea13953c30508233469.camel@cybertec.at>
References: <29dd7b5cf905ee53026f96b78a505f1b76b6031b.camel@sina.com> <0c552a0ee114314ceb026d65f75a98df3e8d22ff.camel@cybertec.at> <c73ac63988c2a162b9842ad7b5d394387c3703a1.camel@sina.com> <34d85bfc77e9a63890e28ea13953c30508233469.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox