Re: Hot standby, recovery infra - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: Hot standby, recovery infra
Date
Msg-id 3f0b79eb0901280654y572398b3s293c2883bf908cb@mail.gmail.com
Whole thread Raw
In response to Re: Hot standby, recovery infra  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Hot standby, recovery infra  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
Hi,

On Wed, Jan 28, 2009 at 11:47 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
>
> On Wed, 2009-01-28 at 23:19 +0900, Fujii Masao wrote:
>
>> > @@ -355,6 +359,27 @@ BackgroundWriterMain(void)
>> >      */
>> >     PG_SETMASK(&UnBlockSig);
>> >
>> > +   BgWriterRecoveryMode = IsRecoveryProcessingMode();
>> > +
>> > +   if (BgWriterRecoveryMode)
>> > +           elog(DEBUG1, "bgwriter starting during recovery");
>> > +   else
>> > +           InitXLOGAccess();
>>
>> Why is InitXLOGAccess() called also here when bgwriter is started after
>> recovery? That is already called by AuxiliaryProcessMain().
>
> InitXLOGAccess() sets the timeline and also gets the latest record
> pointer. If the bgwriter is started in recovery these values need to be
> reset later. It's easier to call it twice.

Right. But, InitXLOGAccess() called during main loop is enough for
that purpose.

Regards,

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


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: How to get SE-PostgreSQL acceptable
Next
From: Euler Taveira de Oliveira
Date:
Subject: Re: Column privileges for system catalogs