Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL
Date
Msg-id 3f0b79eb1003240636y6ba3d739idc4555f88c98e32e@mail.gmail.com
Whole thread Raw
In response to Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL
List pgsql-hackers
On Wed, Mar 24, 2010 at 10:20 PM, Fujii Masao <masao.fujii@gmail.com> wrote:
>> Thanks. That's easily fixable (applies over the previous patch):
>>
>> --- a/src/backend/access/transam/xlog.c
>> +++ b/src/backend/access/transam/xlog.c
>> @@ -3773,7 +3773,7 @@ retry:
>>                pagelsn.xrecoff = 0;
>>            }
>>            /* Wait for the next page to become available */
>> -           if (!XLogPageRead(&pagelsn, emode, false, false))
>> +           if (!XLogPageRead(&pagelsn, emode_arg, false, false))
>>                return NULL;
>>
>>            /* Check that the continuation record looks valid */
>
> Seems correct.

On second thought, the following lines seem to be necessary just after
calling XLogPageRead() since it reads new WAL file from another source.

>    if (readSource == XLOG_FROM_STREAM || readSource == XLOG_FROM_ARCHIVE)
>        emode = PANIC;
>    else
>        emode = emode_arg;

Regards,

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


pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL
Next
From: Bruce Momjian
Date:
Subject: Re: WIP: preloading of ispell dictionary