Re: Postgres PITR: Recovery does not seem to fetch from Archive Dir - Mailing list pgsql-admin

From Luca Ferrari
Subject Re: Postgres PITR: Recovery does not seem to fetch from Archive Dir
Date
Msg-id CAKoxK+79ssdr2GxPry0=mqpGwVi9vfiyFdfmL6ZGADriUqAW4Q@mail.gmail.com
Whole thread Raw
In response to Postgres PITR: Recovery does not seem to fetch from Archive Dir  (Srinath Ganesh <sganesh@galaxiasol.com>)
List pgsql-admin
On Wed, Aug 21, 2019 at 2:01 PM Srinath Ganesh <sganesh@galaxiasol.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



pgsql-admin by date:

Previous
From: Luca Ferrari
Date:
Subject: Re: Permission for not Django app to do Write and Read
Next
From:
Date:
Subject: RE: Postgres DB Slowness