Re: how to delay sync by a set time, hour or day? - Mailing list pgsql-general

From John Smith
Subject Re: how to delay sync by a set time, hour or day?
Date
Msg-id CAMZ8qd9rGe5LnniQiBJe7Ljo+P_GmJawZF6sU13ChNJvsEzBaA@mail.gmail.com
Whole thread Raw
In response to Re: how to delay sync by a set time, hour or day?  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: how to delay sync by a set time, hour or day?
List pgsql-general
On 11/19/14, Michael Paquier <michael.paquier@gmail.com> wrote:
> On Wed, Nov 19, 2014 at 8:37 AM, John Smith <jayzee.smith@gmail.com> wrote:
>>
>> i want to setup a standby slave that listens 24/7 but only syncs when told
>> to.
>>
>> setting "pause_at_recovery_target (boolean)" in recovery.conf on slave
>> doesn't help since docs say it only "specifies whether recovery should
>> pause when the recovery target is reached."
>>
>> also "recovery_target = 'immediate'" is the only value allowed.
>>
>> i want to delay sync by a set time, hour or day.
>>
>> how?
>> http://www.postgresql.org/docs/9.3/static/recovery-target-settings.html
>
> Aren't pg_xlog_replay_pause and pg_xlog_replay_resume what you are looking
> for?
> http://www.postgresql.org/docs/devel/static/functions-admin.html#FUNCTIONS-RECOVERY-CONTROL
> --
> Michael
>

can i use "pg_start_backup('name');" and "pg_stop_backup();"? how
would they work ie if i stop backup, make changes to master, copy
master's /data/ to slave and restart backup, slave should catch-up
with master, right?

is this the same if i use "pg_xlog_replay_pause()" and
"pg_xlog_replay_resume()".

when would i use "pg_stop_backup();" over "pg_xlog_replay_pause()",
aside from user restrictions.

thanks, jzs


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: [sfpug] Linuxfest 2015 Call for Papers
Next
From: zach cruise
Date:
Subject: better architecture?