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

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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
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-26 15:20:35
Message-ID: 6920.1246029635@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> One idea is to merge LocalWALWriteAllowed and LocalRecoveryInProgress
> (and the corresponding shared variables too) into one XLogState variable
> with three states
> * in-recovery
> * normal operation
> * shutdown.

> The variable would always move from a lower state to higher,

Hmm ... this doesn't really feel cleaner to me, although I'm not sure
why not.  One point is that you really don't have enough states there;
there's a difference between "in recovery" and "writing end-of-recovery
checkpoint".  Also, you stated that you want to disable XLogInsert again
as soon as the EOR checkpoint is written, so I don't believe that the
state sequence is really monotonic, unless you split in-recovery into
three sub-states.

On the whole I prefer keeping "InRecovery" and "XLogInsertAllowed" as
separate concepts, I think.

			regards, tom lane

In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2009-06-26 15:23:29
Subject: Re: BUG #4879: bgwriter fails to fsync the file in recovery mode
Previous:From: Heikki LinnakangasDate: 2009-06-26 15:07:24
Subject: Re: BUG #4879: bgwriter fails to fsync the file in recovery mode

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