Hi, On Wed, Jan 28, 2009 at 11:47 PM, Simon Riggs <si...@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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers