Re: Why MarkBufferDirtyHint doesn't increment shared_blks_dirtied

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(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-26 20:09:46
Message-ID: CA+TgmoadMHprF7JSpptGn9mXmBR9F9v=0P6vR0dB3CR4K4Tzpg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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
Author: Robert Haas <rhaas(at)postgresql(dot)org>
Date: Wed Feb 22 20:33:05 2012 -0500

Make EXPLAIN (BUFFERS) track blocks dirtied, as well as those written.

Also expose the new counters through pg_stat_statements.

Patch by me. Review by Fujii Masao and Greg Smith.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2014-03-26 21:01:28 "Conditional jump or move depends on uninitialised value(s)" within jsonfuncs.c
Previous Message Tom Lane 2014-03-26 19:44:09 Re: Minimum supported version of Python?