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

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

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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 recoverymode
Date: 2009-06-25 16:11:36
Message-ID: 1245946296.4038.154.camel@ebony.2ndQuadrant (view raw or flat)
Thread:
Lists: pgsql-bugs
On Thu, 2009-06-25 at 18:12 +0300, Heikki Linnakangas wrote:

> 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.

I think the problem was that it was coded both ways at different stages
of patch evolution. The decision to retain the shutdown checkpoint by
the startup process was taken in January, IIRC.

Having startup process issue this

if (InArchiveRecovery)
	RequestCheckpoint(CHECKPOINT_IS_SHUTDOWN | 
				CHECKPOINT_FORCE |
				CHECKPOINT_WAIT)
else

should make the startup process wait for bgwriter to complete the
checkpoint. But we need to set LocalRecoveryInProgress appropriately
also.

-- 
 Simon Riggs           www.2ndQuadrant.com
 PostgreSQL Training, Services and Support


In response to

Responses

pgsql-bugs by date

Next:From: Heikki LinnakangasDate: 2009-06-25 16:20:00
Subject: Re: BUG #4879: bgwriter fails to fsync the file in recovery mode
Previous:From: Tom LaneDate: 2009-06-25 16:03:30
Subject: Re: BUG #4876: author of MD5 says it's seriously broken - hash collision resistance problems

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