Re: postgres complete recovery - Mailing list pgsql-admin

From Pavan Kumar
Subject Re: postgres complete recovery
Date
Msg-id CA+M0sHGmYKQtr6V=q+=W4nOuS8XUTit8ieO_-2Ev2HfgP44tqA@mail.gmail.com
Whole thread Raw
In response to Re: postgres complete recovery  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: postgres complete recovery  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-admin
Hello David,

Thank you so much for clarification.
is there any way to keep redundant copy of current wall log on same server? means, as soon as transaction commits, it it going to make an entry in wal log and  the same log in different location ?
please advise 

On Mon, Apr 22, 2019 at 4:51 PM David G. Johnston <david.g.johnston@gmail.com> wrote:
Please don't top-post.

On Mon, Apr 22, 2019 at 2:40 PM Pavan Kumar <pavan.dba27@gmail.com> wrote:

1. my postgres did not recovered/read all the wal logs that are existed in wal location?

It did read all necessary WAL files in the ARCHIVE directory.  It failed when it tried to read "*01A" which, as you noted in your experiment, never made it to the archive.

-rw-------.  1 postgres postgres 16777216 Mar  4 06:25 00000001000000000000001A  >>>>> file has latest table test table , log swith not completed so far

Its doesn't get shipping until it fills up or you execute, as you did in the experiment,
===== >>> force manual swtich 
postgres=# select pg_switch_wal();

2. what is the best way to instruct postgresql to read and apply  all the logs are presented on wal location ?

There are two "wal location(s)" - please be more specific as to which one you are referring to.

Now, in a server crash situation where you don't blow up the entire data directory (or local WAL directory if kept separate - a recommended practice), the original WAL files would all be available and would all be read so the recovery gap would be significantly reduced.

David J.



--
Regards,

#!  Pavan Kumar
----------------------------------------------
-
Sr. Database Administrator..!

NEXT GENERATION PROFESSIONALS, LLC
Cell    #  267-799-3182 #  pavan.dba27 (Gtalk)  
India   # 9000459083

Take Risks; if you win, you will be very happy. If you lose you will be Wise  

pgsql-admin by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: postgres complete recovery
Next
From: "David G. Johnston"
Date:
Subject: Re: postgres complete recovery