Re: pg_standby / WAL archive-restore through system restarts

From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: pgsql-general(at)postgresql(dot)org
Cc: Guillaume Lelarge <guillaume(at)lelarge(dot)info>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, David Wall <d(dot)wall(at)computer(dot)org>
Subject: Re: pg_standby / WAL archive-restore through system restarts
Date: 2008-05-13 18:23:27
Message-ID: 200805131423.29069.xzilla@users.sourceforge.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tuesday 13 May 2008 12:48:38 Guillaume Lelarge wrote:
> Alvaro Herrera a écrit :
> > someone wrote:
> >>>> Can I shutdown Server B (backup/recovery postmaster) simply by
> >>>> killing the postmaster and restart it back in recovery mode to
> >>>> continue re-syncing where it left off? Or does stopping Server B
> >>>> while in recovery mode require any manual re-sync steps before it can
> >>>> resume recovery?
> >>>
> >>> I think you'll need to redo the whole process : restore the full data
> >>> backup, create the recovery.conf file, etc.
> >
> > No, you don't. The server can continue replaying files.
>
> Oops, sorry about this. I thought it would have a hard time to go back
> to recovery mode. That's great to know. Thanks.
>
>

There is a caveat here, in that you need to keep around n number of xlogs,
where n is determined based on the last restart point processed on the slave.
If you are deleting all xlogs as they are processed, any shutdown will likely
cause you to have to start the whole thing over again. Note pg_standby and
8.3 give some pretty convenient tools to manage this.

--
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Justin 2008-05-13 18:36:18 Re: rounding problems
Previous Message Vjy 2008-05-13 18:18:47 C function