Re: BUG #4879: bgwriter fails to fsync the file in recovery mode - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #4879: bgwriter fails to fsync the file in recovery mode
Date
Msg-id 22267.1245943888@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #4879: bgwriter fails to fsync the file in recovery mode  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: BUG #4879: bgwriter fails to fsync the file in recovery mode  (Simon Riggs <simon@2ndQuadrant.com>)
Re: BUG #4879: bgwriter fails to fsync the file in recovery mode  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-bugs
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> Heikki Linnakangas wrote:
>> Hmm, what happens when the startup process performs a write, and
>> bgwriter is not running? Do the fsync requests queue up in the shmem
>> queue until the end of recovery when bgwriter is launched? I guess I'll
>> have to try it out...

> Oh dear, doesn't look good. The startup process has a pendingOpsTable of
> its own. bgwriter won't fsync() files that the startup process has
> written itself. That needs to be fixed, or you can lose data when an
> archive recovery crashes after a restartpoint.

Ouch.  I'm beginning to think that the best thing is to temporarily
revert the change that made bgwriter active during recovery.  It's
obviously not been adequately thought through or tested.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Dave Page
Date:
Subject: Re: BUG #4881: KDE 4.2 not running any more when installing one click installer from Enterprise DB
Next
From: Simon Riggs
Date:
Subject: Re: BUG #4879: bgwriter fails to fsync the file in recovery mode