Re: postgres complete recovery

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Pavan Kumar <pavan(dot)dba27(at)gmail(dot)com>
Cc: "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: postgres complete recovery
Date: 2019-04-22 21:51:24
Message-ID: CAKFQuwb6G5a5swwuNmV463EeBm9BEqyNGX7mCjFESThRPoY8DA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Please don't top-post.

On Mon, Apr 22, 2019 at 2:40 PM Pavan Kumar <pavan(dot)dba27(at)gmail(dot)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.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Pavan Kumar 2019-04-22 22:01:54 Re: postgres complete recovery
Previous Message Pavan Kumar 2019-04-22 21:40:09 Re: postgres complete recovery