Re: postgres complete recovery - Mailing list pgsql-admin

From David G. Johnston
Subject Re: postgres complete recovery
Date
Msg-id CAKFQuwb6G5a5swwuNmV463EeBm9BEqyNGX7mCjFESThRPoY8DA@mail.gmail.com
Whole thread Raw
In response to Re: postgres complete recovery  (Pavan Kumar <pavan.dba27@gmail.com>)
Responses Re: postgres complete recovery  (Pavan Kumar <pavan.dba27@gmail.com>)
List pgsql-admin
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.

pgsql-admin by date:

Previous
From: Pavan Kumar
Date:
Subject: Re: postgres complete recovery
Next
From: Pavan Kumar
Date:
Subject: Re: postgres complete recovery