Re: Postgres PITR: Recovery does not seem to fetch from Archive Dir

From: Luca Ferrari <fluca1978(at)gmail(dot)com>
To: Srinath Ganesh <sganesh(at)galaxiasol(dot)com>
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Postgres PITR: Recovery does not seem to fetch from Archive Dir
Date: 2019-08-24 09:52:11
Message-ID: CAKoxK+79ssdr2GxPry0=mqpGwVi9vfiyFdfmL6ZGADriUqAW4Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Wed, Aug 21, 2019 at 2:01 PM Srinath Ganesh <sganesh(at)galaxiasol(dot)com> wrote:
> Recovery conf
>
> nano /home/admin-12/Desktop/test2/recovery.conf
>
> restore_command = 'cp /home/admin-12/Desktop/test2_wal/%f %p'
> recovery_target_time = '2019-08-21 16:14:11.175781+05:30'

If your recovery target time is BEFORE the creation of the other
tables, you will not see them. Remove the recovery target time, so
your database will replay WALs to the very end (which does not make
much sense as PITR, but ...).

>
> WITHOUT THIS STEP I CANNOT RECOVER Table 2,3,..
>
> cp test2.bad/pg_wal/0* test2/pg_wal/
>

You are mixing WALs from one instance and datafiles from two
instances, which is a very bad practice. The database will not be able
to see what is happening. It works because you have shutdown cleanly
the main instance, so data files are consistent.

Luca

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Luca Ferrari 2019-08-24 11:22:38 Re: Permission for not Django app to do Write and Read
Previous Message Luca Ferrari 2019-08-24 09:45:48 Re: Permission for not Django app to do Write and Read