Re: MarkBufferDirtyHint() and LSN update - Mailing list pgsql-hackers

From Kyotaro Horiguchi
Subject Re: MarkBufferDirtyHint() and LSN update
Date
Msg-id 20191112.213134.79258097595612929.horikyota.ntt@gmail.com
Whole thread Raw
In response to Re: MarkBufferDirtyHint() and LSN update  (Antonin Houska <ah@cybertec.at>)
Responses Re: MarkBufferDirtyHint() and LSN update  (Antonin Houska <ah@cybertec.at>)
List pgsql-hackers
At Mon, 11 Nov 2019 10:03:14 +0100, Antonin Houska <ah@cybertec.at> wrote in 
> Michael Paquier <michael@paquier.xyz> wrote:
> > Does something like the attached patch make sense?  Reviews are
> > welcome.
> 
> This looks good to me.

I have a qustion.

The current code assumes that !BM_DIRTY means that the function is
dirtying the page.  But if !BM_JUST_DIRTIED, the function actually is
going to re-dirty the page even if BM_DIRTY.

If this is correct, the trigger for stats update is not !BM_DIRTY but
!BM_JUST_DIRTIED, or the fact that we passed the line of
XLogSaveBufferForHint() could be the trigger, regardless whether the
LSN is valid or not.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



pgsql-hackers by date:

Previous
From: Asif Rehman
Date:
Subject: Re: WIP/PoC for parallel backup
Next
From: Ranier Vilela
Date:
Subject: [PATCH][BUG_FIX] Potential null pointer dereferencing.