Re: Why MarkBufferDirtyHint doesn't increment shared_blks_dirtied

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Why MarkBufferDirtyHint doesn't increment shared_blks_dirtied
Date: 2014-03-27 03:23:21
Message-ID: CAA4eK1+HuX=5=wyz4VgKTh2W71O37YRujoJTSXB=JhRFn9uwXQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 27, 2014 at 1:39 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Mon, Mar 24, 2014 at 9:02 PM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>> MarkBufferDirty() always increment BufferUsage counter
>> (shared_blks_dirtied) for dirty blocks whenever it dirties any
>> block, whereas same is not true for MarkBufferDirtyHint().
>> Is there any particular reason for not incrementing
>> shared_blks_dirtied in MarkBufferDirtyHint()?
>
> Hmm, I think that's a bug, dating back to this commit:
>
> commit 2254367435fcc4a31cc3b6d8324e33c5c30f265a

Right.
Do you think the fix attached in my previous mail is appropriate?
http://www.postgresql.org/message-id/CAA4eK1KQQSpNmfxg8Cg3-JZD23Q4Ee3iCsuLZGekH=DnaGPjRA@mail.gmail.com

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2014-03-27 04:11:28 Re: Minimum supported version of Python?
Previous Message Peter Geoghegan 2014-03-27 03:08:43 B-Tree support function number 3 (strxfrm() optimization)