| From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> | 
|---|---|
| To: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> | 
| Cc: | 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:06:35 | 
| Message-ID: | 1245942395.4038.113.camel@ebony.2ndQuadrant | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-bugs | 
On Thu, 2009-06-25 at 17:35 +0300, Heikki Linnakangas wrote:
> 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.
Yes, that's what I see also. Patch attached.
-- 
 Simon Riggs           www.2ndQuadrant.com
 PostgreSQL Training, Services and Support
| Attachment | Content-Type | Size | 
|---|---|---|
| forwardsfsyncrequests.v1.patch | text/x-patch | 4.9 KB | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Heikki Linnakangas | 2009-06-25 15:12:16 | Re: BUG #4879: bgwriter fails to fsync the file in recovery mode | 
| Previous Message | Simon Riggs | 2009-06-25 14:54:17 | Re: BUG #4879: bgwriter fails to fsync the file in recovery mode |