Re: MarkBufferDirtyHint() and LSN update

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: ah(at)cybertec(dot)at
Cc: michael(at)paquier(dot)xyz, tomas(dot)vondra(at)2ndquadrant(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: MarkBufferDirtyHint() and LSN update
Date: 2019-11-12 12:31:34
Message-ID: 20191112.213134.79258097595612929.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Mon, 11 Nov 2019 10:03:14 +0100, Antonin Houska <ah(at)cybertec(dot)at> wrote in
> Michael Paquier <michael(at)paquier(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ranier Vilela 2019-11-12 13:07:04 [PATCH][BUG_FIX] Potential null pointer dereferencing.
Previous Message Asif Rehman 2019-11-12 12:07:14 Re: WIP/PoC for parallel backup