Skip site navigation (1) Skip section navigation (2)

Re: Hot standby, recovery infra

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Hot standby, recovery infra
Date: 2009-01-28 14:54:53
Message-ID: 3f0b79eb0901280654y572398b3s293c2883bf908cb@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Hi,

On Wed, Jan 28, 2009 at 11:47 PM, Simon Riggs <simon(at)2ndquadrant(dot)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

In response to

Responses

pgsql-hackers by date

Next:From: KaiGai KoheiDate: 2009-01-28 15:13:49
Subject: Re: How to get SE-PostgreSQL acceptable
Previous:From: Euler Taveira de OliveiraDate: 2009-01-28 14:51:38
Subject: Re: Column privileges for system catalogs

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group