Re: [GENERAL] Interrupt WAL recovery

2013-05-22 Thread Jov
you can use pg_xlog_replay_pause(),pg_xlog_replay_resume() to control the
wal replay.
ref doc:http://www.postgresql.org/docs/9.1/static/functions-admin.html


2013/5/22 Raghavendra 

>
> On Wed, May 22, 2013 at 4:15 PM, Raghavendra <
> raghavendra@enterprisedb.com> wrote:
>
>> On Wed, May 22, 2013 at 3:53 PM, Fabio Rueda Carrascosa <
>> avances...@gmail.com> wrote:
>>
>>> Can I stop the server and modify recovery.conf with this param and
>>> restart it again without problems?
>>>
>>>
>> It should work. (Sorry I never tried this, like stopping in middle of the
>> recovery and restarting with some changes. Sure there will be answer's here
>> if someone has more insight on this scenario)
>>
>> Its good to include this parameter in recovery.conf at the recovery start
>> time.
>>
>>
> Just did some testing, two ways found:
>
> 1. You can stop the server and add the recovery_target_time in
> recovery.conf file to current_time + 1 hr, so that recovery completes
> consistently till to the specified time and open the server for R/W.
> 2. You can stop the server and rename the recovery.conf to recovery.done
> and start the server assuming it has reached to consistent state by this
> way it opens the server from that point for R/W.
>
> --Raghav
>
>
>> -- Raghav
>>
>>
>>
>>
>>>
>>> 2013/5/22 Raghavendra 
>>>
 On Wed, May 22, 2013 at 3:38 PM, Fabio Rueda Carrascosa <
 avances...@gmail.com> wrote:

> hello , I'm restoring a 7 days ago full backup  + wal files. I have to
> recover more than 6k wal files and I have no time, I would accept to work
> with a ~ 3 days ago snapshot, can I stop the recovery process and start 
> the
> server?, if yes, how?
>
> My recovery.conf file only has this line :
>
> restore_command = 'envdir /etc/wal-e.d/env /etc/wal-e.d/wal-e
> wal-fetch "%f" "%p"'
>
> Thanks in advance.
>

 You can control the recovery process with recovery_target_time
 parameter.  This parameter helps you to recover wals till to the acceptable
 time for you from the snapshot.

 http://www.postgresql.org/docs/9.2/static/recovery-target-settings.html

 ---
 Regards,
 Raghavendra
 EnterpriseDB Corporation
 Blog: http://raghavt.blogspot.com/


>>>
>>
>


-- 
Jov
blog: http:amutu.com/blog 


Re: [GENERAL] Interrupt WAL recovery

2013-05-22 Thread Raghavendra
On Wed, May 22, 2013 at 4:15 PM, Raghavendra <
raghavendra@enterprisedb.com> wrote:

> On Wed, May 22, 2013 at 3:53 PM, Fabio Rueda Carrascosa <
> avances...@gmail.com> wrote:
>
>> Can I stop the server and modify recovery.conf with this param and
>> restart it again without problems?
>>
>>
> It should work. (Sorry I never tried this, like stopping in middle of the
> recovery and restarting with some changes. Sure there will be answer's here
> if someone has more insight on this scenario)
>
> Its good to include this parameter in recovery.conf at the recovery start
> time.
>
>
Just did some testing, two ways found:

1. You can stop the server and add the recovery_target_time in
recovery.conf file to current_time + 1 hr, so that recovery completes
consistently till to the specified time and open the server for R/W.
2. You can stop the server and rename the recovery.conf to recovery.done
and start the server assuming it has reached to consistent state by this
way it opens the server from that point for R/W.

--Raghav


> -- Raghav
>
>
>
>
>>
>> 2013/5/22 Raghavendra 
>>
>>> On Wed, May 22, 2013 at 3:38 PM, Fabio Rueda Carrascosa <
>>> avances...@gmail.com> wrote:
>>>
 hello , I'm restoring a 7 days ago full backup  + wal files. I have to
 recover more than 6k wal files and I have no time, I would accept to work
 with a ~ 3 days ago snapshot, can I stop the recovery process and start the
 server?, if yes, how?

 My recovery.conf file only has this line :

 restore_command = 'envdir /etc/wal-e.d/env /etc/wal-e.d/wal-e wal-fetch
 "%f" "%p"'

 Thanks in advance.

>>>
>>> You can control the recovery process with recovery_target_time
>>> parameter.  This parameter helps you to recover wals till to the acceptable
>>> time for you from the snapshot.
>>>
>>> http://www.postgresql.org/docs/9.2/static/recovery-target-settings.html
>>>
>>> ---
>>> Regards,
>>> Raghavendra
>>> EnterpriseDB Corporation
>>> Blog: http://raghavt.blogspot.com/
>>>
>>>
>>
>


Re: [GENERAL] Interrupt WAL recovery

2013-05-22 Thread Raghavendra
On Wed, May 22, 2013 at 3:53 PM, Fabio Rueda Carrascosa <
avances...@gmail.com> wrote:

> Can I stop the server and modify recovery.conf with this param and restart
> it again without problems?
>
>
It should work. (Sorry I never tried this, like stopping in middle of the
recovery and restarting with some changes. Sure there will be answer's here
if someone has more insight on this scenario)

Its good to include this parameter in recovery.conf at the recovery start
time.

-- Raghav




>
> 2013/5/22 Raghavendra 
>
>> On Wed, May 22, 2013 at 3:38 PM, Fabio Rueda Carrascosa <
>> avances...@gmail.com> wrote:
>>
>>> hello , I'm restoring a 7 days ago full backup  + wal files. I have to
>>> recover more than 6k wal files and I have no time, I would accept to work
>>> with a ~ 3 days ago snapshot, can I stop the recovery process and start the
>>> server?, if yes, how?
>>>
>>> My recovery.conf file only has this line :
>>>
>>> restore_command = 'envdir /etc/wal-e.d/env /etc/wal-e.d/wal-e wal-fetch
>>> "%f" "%p"'
>>>
>>> Thanks in advance.
>>>
>>
>> You can control the recovery process with recovery_target_time parameter.
>>  This parameter helps you to recover wals till to the acceptable time for
>> you from the snapshot.
>>
>> http://www.postgresql.org/docs/9.2/static/recovery-target-settings.html
>>
>> ---
>> Regards,
>> Raghavendra
>> EnterpriseDB Corporation
>> Blog: http://raghavt.blogspot.com/
>>
>>
>


Re: [GENERAL] Interrupt WAL recovery

2013-05-22 Thread Fabio Rueda Carrascosa
Can I stop the server and modify recovery.conf with this param and restart
it again without problems?

Thanks a lot.


2013/5/22 Raghavendra 

> On Wed, May 22, 2013 at 3:38 PM, Fabio Rueda Carrascosa <
> avances...@gmail.com> wrote:
>
>> hello , I'm restoring a 7 days ago full backup  + wal files. I have to
>> recover more than 6k wal files and I have no time, I would accept to work
>> with a ~ 3 days ago snapshot, can I stop the recovery process and start the
>> server?, if yes, how?
>>
>> My recovery.conf file only has this line :
>>
>> restore_command = 'envdir /etc/wal-e.d/env /etc/wal-e.d/wal-e wal-fetch
>> "%f" "%p"'
>>
>> Thanks in advance.
>>
>
> You can control the recovery process with recovery_target_time parameter.
>  This parameter helps you to recover wals till to the acceptable time for
> you from the snapshot.
>
> http://www.postgresql.org/docs/9.2/static/recovery-target-settings.html
>
> ---
> Regards,
> Raghavendra
> EnterpriseDB Corporation
> Blog: http://raghavt.blogspot.com/
>
>


Re: [GENERAL] Interrupt WAL recovery

2013-05-22 Thread Raghavendra
On Wed, May 22, 2013 at 3:38 PM, Fabio Rueda Carrascosa <
avances...@gmail.com> wrote:

> hello , I'm restoring a 7 days ago full backup  + wal files. I have to
> recover more than 6k wal files and I have no time, I would accept to work
> with a ~ 3 days ago snapshot, can I stop the recovery process and start the
> server?, if yes, how?
>
> My recovery.conf file only has this line :
>
> restore_command = 'envdir /etc/wal-e.d/env /etc/wal-e.d/wal-e wal-fetch
> "%f" "%p"'
>
> Thanks in advance.
>

You can control the recovery process with recovery_target_time parameter.
 This parameter helps you to recover wals till to the acceptable time for
you from the snapshot.

http://www.postgresql.org/docs/9.2/static/recovery-target-settings.html

---
Regards,
Raghavendra
EnterpriseDB Corporation
Blog: http://raghavt.blogspot.com/


[GENERAL] Interrupt WAL recovery

2013-05-22 Thread Fabio Rueda Carrascosa
hello , I'm restoring a 7 days ago full backup  + wal files. I have to
recover more than 6k wal files and I have no time, I would accept to work
with a ~ 3 days ago snapshot, can I stop the recovery process and start the
server?, if yes, how?

My recovery.conf file only has this line :

restore_command = 'envdir /etc/wal-e.d/env /etc/wal-e.d/wal-e wal-fetch
"%f" "%p"'

Thanks in advance.