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 5515.1245964262@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #4879: bgwriter fails to fsync the file in recovery mode  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: BUG #4879: bgwriter fails to fsync the file in recovery mode
List pgsql-bugs
Simon Riggs <simon@2ndQuadrant.com> writes:
> So, yes, there are some places where InRecovery is used in code executed
> by the bgwriter, but the correct fix is to use RecoveryIsInProgress().

Agreed, but this gets us no closer to solving the real problem, which is
that when we perform the end-of-recovery checkpoint, we need to act like
we are *not* in recovery anymore, for at least some purposes.  Most
notably, to allow us to write a WAL entry at all; but I am suspicious
that pretty much every InRecovery/RecoveryIsInProgress test that that
checkpoint might execute should behave as if we're not in recovery.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: BUG #4879: bgwriter fails to fsync the file in recovery mode
Next
From: Tom Lane
Date:
Subject: Re: BUG #4879: bgwriter fails to fsync the file in recovery mode