Re: Set hint bits upon eviction from BufMgr

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Set hint bits upon eviction from BufMgr
Date: 2011-03-28 14:09:57
Message-ID: AANLkTi=wpoenKQQFFQ5wfBJXbL++YrMui75EvEjKU7ti@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 28, 2011 at 9:48 AM, Merlin Moncure <mmoncure(at)gmail(dot)com> wrote:
> I'd like to experiment on this and see what comes out.

Great!

> If the
> bgwriter was to be granted the ability to inspect buffers and set
> hints, it needs to be able to peek in and inspect the buffer itself
> which it currently doesn't do FWICT.

That matches my understanding.

> I was thinking about setting a
> flag in the buffer (BM_HEAP) that gets set by the loader which flags
> the buffer for later inspection.  Is there a simpler way to do this?

Hmm. That's slightly crufty, but it might be OK. At least, I don't
have a better idea.

> I think you guys are correct: the logic belongs in the bgwriter.
> Generally speaking, it looks like the best route to minimizing hint
> bit pain is to if at all possible write them out set so they don't
> have to be rewritten later (Stephen's approach to leverage in
> transaction table creation is another way of attempting to do that).

Yeah.

--
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 Heikki Linnakangas 2011-03-28 14:11:31 Re: Additional options for Sync Replication
Previous Message Robert Haas 2011-03-28 14:04:36 Re: alpha5