From: Cesar Otero <cesar.otero.souto@gmail.com>
To: Simon Riggs <simon@2ndquadrant.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Restarting standby database have to reaply WAL (redo logs)
Date: Tue, 25 Sep 2007 14:14:36 -0300
Message-ID: <a7aeff880709251014w2e236affofd2fabff5a1520dc@mail.gmail.com> (raw)
In-Reply-To: <1190739865.4181.507.camel@ebony.site>
References: <a7aeff880709250841u749b40a2t3cb401f90b4aa3ae@mail.gmail.com>
<1190739865.4181.507.camel@ebony.site>
I mean before shutdown the last log applied was
0000000100000018000000A5 and after restart pg try to apply from wal
00000001000000180000009D.
The 00000001000000180000009D file is the first wal created in the hot
backup process.
I think that after restarting standby db the first log should be last
log applied + 1
On 9/25/07, Simon Riggs <simon@2ndquadrant.com> wrote:
> On Tue, 2007-09-25 at 12:41 -0300, Cesar Otero wrote:
>
> > Then shutdown standby
> >
> > ##############################################
> > WAL file not present yet. Checking for trigger file...2007-09-25
> > 12:31:47 ARTLOG: received fast shutdown request
> > 2007-09-25 12:31:47 ARTFATAL: could not restore file
> > "0000000100000018000000A6" from archive: return code 15
> > 2007-09-25 12:31:47 ARTLOG: startup process (PID 29654) exited with exit code 1
> > 2007-09-25 12:31:47 ARTLOG: aborting startup due to startup process failure
> > 2007-09-25 12:31:47 ARTLOG: logger shutting down
>
> The shutdown takes down all processes, so the current restore fails in
> mid-flight. That's how it works, currently.
>
> > And start standby again
>
> > Trigger file : /var/lib/postgres/procuracion/standby.trigger
> > Waiting for WAL file :
> > /var/lib/postgres/archive/procuracion/00000001000000180000009D
> > WAL file path : 00000001000000180000009D
> > Restoring to... : pg_xlog/RECOVERYXLOG
> > Sleep interval : 5 seconds
> > Max wait interval : 0 forever
> > Command for restore : cp
> > "/var/lib/postgres/archive/procuracion/00000001000000180000009D"
> > "pg_xlog/RECOVERYXLOG"
>
> Then we restart recovery from the last restartpoint.
>
> Is that what you meant?
>
> --
> Simon Riggs
> 2ndQuadrant http://www.2ndQuadrant.com
>
>
--
Ing. César Otero Souto
TE: 54 11 15-6860-2366
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: cesar.otero.souto@gmail.com, simon@2ndquadrant.com
Subject: Re: Restarting standby database have to reaply WAL (redo logs)
In-Reply-To: <a7aeff880709251014w2e236affofd2fabff5a1520dc@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox