Re: Recovery.conf and PITR

From: Luca Ferrari <fluca1978(at)infinito(dot)it>
To: "ascot(dot)moss(at)gmail(dot)com" <ascot(dot)moss(at)gmail(dot)com>
Cc: PostgreSQL general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Recovery.conf and PITR
Date: 2013-08-09 08:49:05
Message-ID: CAKoxK+7E62W8FjMwipX4OhzOH8VgU=L+d_E76ibSAmMc15-CrA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-general

On Fri, Aug 9, 2013 at 10:09 AM, ascot(dot)moss(at)gmail(dot)com
<ascot(dot)moss(at)gmail(dot)com> wrote:
> Hi,
>
> I am trying PITR in a test machine (same PG version 9.2.4 same O/S Ubuntu 12.04 64 bit). All archived WAL files are shipped and saved in /var/pgsql/data/archive, the latest transaction txid of them is 75666. I want to recover PG at a point of time that if XIDs are equal or smaller than '75634' so I have the following recovery.conf (only two lines):
>
> restore_command = 'cp /var/pgsql/data/archive/%f %p'
> recovery_target_xid = '75634'
>
>
> After the restart of PG, the recovery.conf is processed and it is renamed to recovery.done. However it restored all (75666) instead of '75634'.

Any chance the 75666 committed before the one you specified as target?
From the docs (http://www.postgresql.org/docs/9.1/static/recovery-target-settings.html):

The transactions that will be recovered are those that committed
before (and optionally including) the specified one.

Luca

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message ascot.moss@gmail.com 2013-08-09 09:38:01 archive folder housekeeping
Previous Message Gabriele Bartolini 2013-08-09 08:41:03 Re: Recovery.conf and PITR

Browse pgsql-general by date

  From Date Subject
Next Message Oliver Elphick 2013-08-09 09:21:29 Re: Postgres won't start
Previous Message Gabriele Bartolini 2013-08-09 08:41:03 Re: Recovery.conf and PITR