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

Re: BUG #4879: bgwriter fails to fsync the file in recovery mode

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Simon Riggs <simon(at)2ndQuadrant(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4879: bgwriter fails to fsync the file in recovery mode
Date: 2009-06-25 15:12:16
Message-ID: 4A4393D0.70804@enterprisedb.com (view raw or flat)
Thread:
Lists: pgsql-bugs
Tom Lane wrote:
> Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
>> In archive recovery, we always start bgwriter at the beginning of WAL
>> replay. In crash recovery, we don't start bgwriter until the end of wAL
>> replay. So we could change the "!isRedo" condition to
>> "!InArchiveRecovery". It's not a very clean solution, but it's simple.
> 
> This is probably what is needed.  We need to look around for other tests
> of "in redo" that have been obsoleted by the change in bgwriter
> behavior.

We have another problem with the end-of-recovery checkpoint. When the
startup process does the checkpoint, it won't know to perform the
pending fsyncs() the bgwriter has absorbed.

A short fix would be to have bgwriter do the shutdown checkpoint instead
in archive recovery. I don't recall if there was a reason it wasn't
coded like that to begin with, though.

-- 
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com

In response to

Responses

pgsql-bugs by date

Next:From: Dave PageDate: 2009-06-25 15:14:37
Subject: Re: BUG #4881: KDE 4.2 not running any more when installing one click installer from Enterprise DB
Previous:From: Simon RiggsDate: 2009-06-25 15:06:35
Subject: Re: BUG #4879: bgwriter fails to fsync the file in recoverymode

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