Thread: pgsql: Basic Recovery Control functions for use in Hot Standby. Pause,

pgsql: Basic Recovery Control functions for use in Hot Standby. Pause,

From
Simon Riggs
Date:
Basic Recovery Control functions for use in Hot Standby. Pause, Resume,
Status check functions only. Also, new recovery.conf parameter to
pause_at_recovery_target, default on.

Simon Riggs, reviewed by Fujii Masao

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=8c6e3adbf792c2bba448e88cbf2c8e03fb802e73

Modified Files
--------------
doc/src/sgml/func.sgml             |   58 +++++++++++++++
doc/src/sgml/recovery-config.sgml  |   25 +++++++
src/backend/access/transam/xlog.c  |  137 ++++++++++++++++++++++++++++++++++++
src/include/access/xlog_internal.h |    3 +
src/include/catalog/pg_proc.h      |    7 ++
5 files changed, 230 insertions(+), 0 deletions(-)


Re: pgsql: Basic Recovery Control functions for use in Hot Standby. Pause,

From
Jaime Casanova
Date:
On Tue, Feb 8, 2011 at 1:30 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
> Basic Recovery Control functions for use in Hot Standby. Pause, Resume,
> Status check functions only. Also, new recovery.conf parameter to
> pause_at_recovery_target, default on.
>

I guess that new parameter should also be in recovery.conf.sample, right?

--
Jaime Casanova         www.2ndQuadrant.com
Professional PostgreSQL: Soporte y capacitación de PostgreSQL

Re: pgsql: Basic Recovery Control functions for use in Hot Standby. Pause,

From
Fujii Masao
Date:
On Wed, Feb 9, 2011 at 1:00 PM, Jaime Casanova <jaime@2ndquadrant.com> wrote:
> On Tue, Feb 8, 2011 at 1:30 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
>> Basic Recovery Control functions for use in Hot Standby. Pause, Resume,
>> Status check functions only. Also, new recovery.conf parameter to
>> pause_at_recovery_target, default on.
>>
>
> I guess that new parameter should also be in recovery.conf.sample, right?

Right.

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Re: pgsql: Basic Recovery Control functions for use in Hot Standby. Pause,

From
Jaime Casanova
Date:
On Tue, Feb 8, 2011 at 11:00 PM, Jaime Casanova <jaime@2ndquadrant.com> wrote:
> On Tue, Feb 8, 2011 at 1:30 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
>> Basic Recovery Control functions for use in Hot Standby. Pause, Resume,
>> Status check functions only. Also, new recovery.conf parameter to
>> pause_at_recovery_target, default on.
>>
>
> I guess that new parameter should also be in recovery.conf.sample, right?
>

This one is still not in recovery.conf.sample

--
Jaime Casanova         www.2ndQuadrant.com
Professional PostgreSQL: Soporte y capacitación de PostgreSQL

Re: pgsql: Basic Recovery Control functions for use in Hot Standby. Pause,

From
Fujii Masao
Date:
On Tue, Mar 8, 2011 at 9:20 AM, Jaime Casanova <jaime@2ndquadrant.com> wrote:
> On Tue, Feb 8, 2011 at 11:00 PM, Jaime Casanova <jaime@2ndquadrant.com> wrote:
>> On Tue, Feb 8, 2011 at 1:30 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
>>> Basic Recovery Control functions for use in Hot Standby. Pause, Resume,
>>> Status check functions only. Also, new recovery.conf parameter to
>>> pause_at_recovery_target, default on.
>>>
>>
>> I guess that new parameter should also be in recovery.conf.sample, right?
>>
>
> This one is still not in recovery.conf.sample

What about the attached patch?

>> And it definitely needs to be mentioned in the docs for
>> pause_at_recovery_target that it only works in hot standby.

Done.

>>> On the second thought, I think it's useful to emit the NOTICE message when
>>> recovery reaches the pause point, as follows.
>>>
>>>     NOTICE: Recovery will not complete until pg_xlog_replay_resume() is called.
>>
>> I'm OK with adding a message, but NOTICE is the wrong level.
>>
>> My proposal is this message
>>
>> LOG:  Recovery has paused. Execute pg_xlog_replay_resume() to continue.

Done.

And, I found that <indexterm> tag has not been added for recovery
control functions
yet. So I added that into func.sgml.

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Attachment
Fujii Masao <masao.fujii@gmail.com> writes:
> What about the attached patch?

> +                         ereport(LOG,
> +                                 (errmsg("Recovery has paused. Execute pg_xlog_replay_resume() to continue.")));

This isn't even close to following our message style guidelines ...

            regards, tom lane

Re: pgsql: Basic Recovery Control functions for use in Hot Standby. Pause,

From
Fujii Masao
Date:
On Tue, Mar 8, 2011 at 12:04 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Fujii Masao <masao.fujii@gmail.com> writes:
>> What about the attached patch?
>
>> +                                             ereport(LOG,
>> +                                                             (errmsg("Recovery has paused. Execute
pg_xlog_replay_resume()to continue."))); 
>
> This isn't even close to following our message style guidelines ...

Thanks! I lower-cased the leading character of the first sentence, and treated
the second as HINT. I attached the updated patch.

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Attachment