Re: Backup hot-standby database. - Mailing list pgsql-admin

From Robert Treat
Subject Re: Backup hot-standby database.
Date
Msg-id AANLkTi=yJun+gVppAV2Un5K8OXrynt3_pB4s2M=1cqhr@mail.gmail.com
Whole thread Raw
In response to Re: Backup hot-standby database.  (Stephen Rees <srees@pandora.com>)
List pgsql-admin
On Fri, Mar 18, 2011 at 4:55 PM, Stephen Rees <srees@pandora.com> wrote:
> Robert,
>
> Thank you for reply. I had the wrong end of the stick regarding pg_dump and
> hot-standby.
> I will take a look at omnipitr, as you suggest.
>
> Per your comment
>>
>> You have to stop replay while you are doing the dumps like this
>
> how do I stop, then resume, replay with both the master and hot-standby
> available throughout?
>

If you are using WAL file based replication, you need some logic in
your restore script that will enable it to stop feeding xlog segments
into the slave (think "if pause file exists, return, else cp xlog
file"). This would leave the slave available, just with no updates
coming in.

If you are using streaming, I think it's much harder. There are some
new function to pause and resume streaming WAL coming in 9.1, it might
be possible to back-patch those, but we haven't looked at it yet.


Robert Treat
play: xzilla.net
work: omniti.com
hiring: l42.org/lg

pgsql-admin by date:

Previous
From: jonathan ferguson
Date:
Subject: Re: Hot-standby/Reporting database.
Next
From: "Nicholson, Brad (Toronto, ON, CA)"
Date:
Subject: Re: pg_stat_all_tables column value reseting problem.